Skip to content

Commit

Permalink
parse primary key constraint with no order on column
Browse files Browse the repository at this point in the history
  • Loading branch information
madtibo committed Jun 20, 2018
1 parent bebf86d commit 2640919
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ doesn't exist either in PG. So more constraints will fail.

Can this tool migrate functions and stored procedures?
----------------------------------
No, Transact-SQL is very different from PostgreSQL's many PL languages. You could give a look at https://bitbucket.org/openscg/pgtsql but I can't help you with this… and I don't think it is a long term viable option.
No, Transact-SQL is very different from PostgreSQL's many PL languages. These would need a manual migration.
Binary file modified regression/reg_tests.sql
Binary file not shown.
4 changes: 2 additions & 2 deletions sqlserver2pgsql.pl
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ sub generate_kettle
if (defined($refschema->{TABLES}->{$table}->{PK}->{COLS}))
{
my @pk=@{$refschema->{TABLES}->{$table}->{PK}->{COLS}};
my $keys;
my $keys="";
foreach my $pk(@pk)
{
$keys.="<key>$pk</key>\n";
Expand Down Expand Up @@ -1854,7 +1854,7 @@ sub parse_dump
CONS: while (my $consline= read_and_clean($file))
{
next if ($consline =~ /^\($/);
if ($consline =~ /^\t\[(.*)\] (?:ASC)?,?$/)
if ($consline =~ /^\t\[(.*)\]\s+(?:ASC)?,?$/)
{
push @{$constraint->{COLS}}, ($1);
}
Expand Down

0 comments on commit 2640919

Please sign in to comment.