From: Jess Robinson Date: Sat, 26 Aug 2006 11:34:49 +0000 (+0000) Subject: Support Pg timestamp type followed by an optional size, which denotes the type of... X-Git-Tag: v0.11008~409 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b0f2faf82b7fd3c7471c53a852d721bf32df7415;p=dbsrgits%2FSQL-Translator.git Support Pg timestamp type followed by an optional size, which denotes the type of timestamp --- diff --git a/lib/SQL/Translator/Parser/PostgreSQL.pm b/lib/SQL/Translator/Parser/PostgreSQL.pm index b666ea0..4c6b861 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.47 2006-06-09 13:56:58 schiffbruechige Exp $ +# $Id: PostgreSQL.pm,v 1.48 2006-08-26 11:34:49 schiffbruechige 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.47 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.48 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; @@ -553,7 +553,7 @@ pg_data_type : $return = { type => 'bytea' }; } | - /(timestamptz|timestamp)( with(out)? time zone)?/i + /(timestamptz|timestamp)(?:\(\d\))?( with(out)? time zone)?/i { $return = { type => 'timestamp' }; }