From: Peter Rabbitson Date: Tue, 5 May 2009 07:06:33 +0000 (+0000) Subject: Fix a couple of mistakes in the PG parser X-Git-Tag: v0.11008~163^2~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d4056aa7a7215f62ed61bfe1aa13cd3a5ded7ac2;p=dbsrgits%2FSQL-Translator.git Fix a couple of mistakes in the PG parser --- diff --git a/lib/SQL/Translator/Parser/PostgreSQL.pm b/lib/SQL/Translator/Parser/PostgreSQL.pm index 7d446c2..2fc37ce 100644 --- a/lib/SQL/Translator/Parser/PostgreSQL.pm +++ b/lib/SQL/Translator/Parser/PostgreSQL.pm @@ -266,7 +266,6 @@ create : CREATE unique(?) /(index|key)/i index_name /on/i table_name using_metho method => $item{'using_method'}[0], } ; - } # @@ -479,7 +478,7 @@ name_with_opt_quotes : double_quote(?) NAME double_quote(?) { $item[2] } double_quote: /"/ -index_name : WORD +index_name : name_with_opt_quotes data_type : pg_data_type parens_value_list(?) { @@ -625,7 +624,7 @@ table_constraint : comment(s?) constraint_name(?) table_constraint_type deferrab my @comments = ( @{ $item[1] }, @{ $item[-1] } ); $return = { - name => $item{'constraint_name'}[0] || '', + name => $item[2][0] || '', supertype => 'constraint', type => $type, fields => $type ne 'check' ? $fields : [],