Subject: | Bug in PostgreSQL parser |
The PostgreSQL parser fails on column specifications such as
ts timestamp without time zone
although the parser grammer should handle this. Looks like a bug
in Parse::RecDescent.
However it can be worked around by merging the grammar lines for
timestamp with time zone
and
timestamp without time zone
The attached patch fixes this for me...
Subject: | patch.diff |
Index: lib/SQL/Translator/Parser/PostgreSQL.pm
--- /tmp/old/PostgreSQL.pm 2006-03-10 12:17:34.000000000 +0000
+++ /tmp/new/PostgreSQL.pm 2006-03-10 12:12:22.000000000 +0000
@@ -546,12 +546,7 @@
$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' };
}