Committing patches sent by Florian Helmberger. Here are his remarks:
Here are two patches for a few bugs in the PostgreSQL parser and producer.
The patch for lib/SQL/Translator/Parser/DBI/PostgreSQL.pm fixes a simple
typo which resulted in the complete absence of the field types and
corrects the way is_nullable is set so the producer now correctly flags
NOT NULL fields.
The patch for lib/SQL/Translator/Producer/PostgreSQL.pm adds missing
newlines to the last line of the 'Table:' and 'Comments:' headers. Also
it fixes an 'use of uninizialised value' warning in 359.
Before the patch the output for command
sqlt --from DBI --dsn dbi:Pg:dbname=testdb --to PostgreSQL \
--db-user postgres
looked like:
====
--
-- Table: mailaliases
--CREATE TABLE "mailaliases" (
"aliasname" (204),
"aliasto" (204),
"domain" (132),
"id" ,
"isdefault" ,
"datecreate" ,
Constraint "foo" UNIQUE ("isdefault")
);
====
After the patch it looks like:
====
--
-- Table: mailaliases
--
CREATE TABLE "mailaliases" (
"aliasname" character varying(204),
"aliasto" character varying(204),
"domain" character varying(132),
"id" int4 NOT NULL,
"isdefault" int4,
"datecreate" text,
Constraint "foo" UNIQUE ("isdefault")
);
====