[thelist] MySQL to PostgreSQL Conversion
Judah McAuley
judah at wiredotter.com
Mon Apr 25 17:58:29 CDT 2005
My first guess would be the bit that says "ENGINE=InnoDB". InnoDB is an
sql engine specific to MySql. As far as I know Postgres doesn't have
InnoDB as an engine option. So try removing that bit and see what
Postgres has to say.
Judah
Warren Murray wrote:
> What's wrong with this SQL Statement in the my conversion from MySQL to
> PostgreSQL?
>
> DROP TABLE "tblattachment";
> CREATE TABLE "tblattachment" (
> "A_ID" varchar(38) NOT NULL default '',
> "A_Parent" varchar(38) NOT NULL default '',
> "A_Classification" INT4 default '0',
> "A_Releasability" varchar(65) default NULL,
> "A_Type" varchar(65) default NULL,
> "A_Name" varchar(65) NOT NULL default '',
> "A_Description" varchar(255) default NULL,
> "A_Content" longblob,
> "A_Owner" varchar(38) NOT NULL default '',
> "A_DateUpdated" datetime default NULL,
> PRIMARY KEY ("A_ID"),
> CREATE INDEX "A_Parent" ON TABLE ("A_Parent")
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>
> It fails with this error: "ERROR: syntax error at or near "CREATE" at
> character 509";
>
> Thanks!
>
> Warren
More information about the thelist
mailing list