From: Ben Faga Date: Tue, 21 Mar 2006 18:39:28 +0000 (+0000) Subject: Applying the patch submitted with this bug report X-Git-Tag: v0.11008~455 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9ae0d32def767bf32c7113a6e4737d482c6dfa9b;p=dbsrgits%2FSQL-Translator.git Applying the patch submitted with this bug report https://rt.cpan.org/Public/Bug/Display.html?id=18096 by Nigel Metheringham. Fixes a bug where it wouldn't parse create statements that included "timestamp without time zone". --- diff --git a/lib/SQL/Translator/Parser/PostgreSQL.pm b/lib/SQL/Translator/Parser/PostgreSQL.pm index 180726c..d1a168a 100644 --- a/lib/SQL/Translator/Parser/PostgreSQL.pm +++ b/lib/SQL/Translator/Parser/PostgreSQL.pm @@ -1,7 +1,7 @@ package SQL::Translator::Parser::PostgreSQL; # ------------------------------------------------------------------- -# $Id: PostgreSQL.pm,v 1.45 2005-07-06 05:37:32 allenday Exp $ +# $Id: PostgreSQL.pm,v 1.46 2006-03-21 18:39:28 mwz444 Exp $ # ------------------------------------------------------------------- # Copyright (C) 2002-4 SQLFairy Authors # @@ -108,7 +108,7 @@ View table: use strict; use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.45 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.46 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; @@ -546,12 +546,7 @@ pg_data_type : $return = { type => 'bytea' }; } | - /(timestamptz|timestamp)( with time zone)?/i - { - $return = { type => 'timestamp' }; - } - | - /(timestamptz|timestamp)( without time zone)?/i + /(timestamptz|timestamp)( with(out)? time zone)?/i { $return = { type => 'timestamp' }; }