Enforce XML::LibXML version requirements
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Parser / PostgreSQL.pm
index cca9d48..071a0a1 100644 (file)
@@ -106,7 +106,7 @@ View table:
 
 use strict;
 use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ];
-$VERSION = '1.60';
+$VERSION = '1.59';
 $DEBUG   = 0 unless defined $DEBUG;
 
 use Data::Dumper;
@@ -610,9 +610,9 @@ pg_data_type :
             $return = { type => 'bytea' };
         }
     |
-    /(timestamptz|timestamp)(?:\(\d\))?( with(out)? time zone)?/i
+    /(timestamptz|timestamp)(?:\(\d\))?( with(?:out)? time zone)?/i
         { 
-            $return = { type => 'timestamp' };
+            $return = { type => 'timestamp' . ($2||'') };
         }
     |
     /text/i
@@ -660,7 +660,7 @@ table_constraint : comment(s?) constraint_name(?) table_constraint_type deferrab
             deferred         => $item{'deferred'},
             reference_table  => $desc->{'reference_table'},
             reference_fields => $desc->{'reference_fields'},
-            match_type       => $desc->{'match_type'}[0],
+            match_type       => $desc->{'match_type'},
             on_delete        => $desc->{'on_delete'} || $desc->{'on_delete_do'},
             on_update        => $desc->{'on_update'} || $desc->{'on_update_do'},
             comments         => [ @comments ],
@@ -718,9 +718,7 @@ deferrable : not(?) /deferrable/i
 
 deferred : /initially/i /(deferred|immediate)/i { $item[2] }
 
-match_type : /match full/i { 'match_full' }
-    |
-    /match partial/i { 'match_partial' }
+match_type : /match/i /partial|full|simple/i { $item[2] }
 
 key_action : key_delete 
     |
@@ -1119,7 +1117,7 @@ sub parse {
 
 =head1 AUTHORS
 
-Ken Youens-Clark E<lt>kclark@cpan.orgE<gt>,
+Ken Y. Clark E<lt>kclark@cpan.orgE<gt>,
 Allen Day E<lt>allenday@ucla.eduE<gt>.
 
 =head1 SEE ALSO