Re: Convert from Mysql to Postgresql - Mailing list pgsql-novice

From Josh Berkus
Subject Re: Convert from Mysql to Postgresql
Date
Msg-id web-690975@davinci.ethosmedia.com
Whole thread Raw
In response to Convert from Mysql to Postgresql  ("Brian Johnson" <bjohnson@jecinc.on.ca>)
Responses Re: Convert from Mysql to Postgresql
List pgsql-novice
Brian,

> CREATE TABLE palm_addressbook (
>   cal_id int(11) NOT NULL default '0',
>   account_id int(11) NOT NULL default '0',
>   palm_rec_id int(11) NOT NULL default '0',
>   PRIMARY KEY  (cal_id,account_id),
>   UNIQUE KEY account_id (account_id,palm_rec_id)
> ) TYPE=MyISAM;

Aieee!  I had no idea that MySQL syntax was that non-standard ...

> I think it would be

You're close.  Use:

> CREATE TABLE palm_addressbook (
>   cal_id int4 NOT NULL default (0),
>   account_id int4 NOT NULL default (0),
>   palm_rec_id int4 NOT NULL default (0),
>   CONSTRAINT cs_palm_address_key PRIMARY KEY (cal_id,account_id)
>   );

And, hey, if you get a Palm-to-postgresql app running, send me e-mail.
  I might be able to re-sell it.

-Josh





pgsql-novice by date:

Previous
From: "Brian Johnson"
Date:
Subject: Convert from Mysql to Postgresql
Next
From: Tom Lane
Date:
Subject: Re: Convert from Mysql to Postgresql