Hi. 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")
);
====
Cheers,
Florian
postgresql-patches.tar.gz
Description: application/gzip
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
-- sqlfairy-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers
