Re: Convert from Mysql to Postgresql

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: "Brian Johnson" <bjohnson(at)jecinc(dot)on(dot)ca>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Convert from Mysql to Postgresql
Date: 2002-02-11 23:13:11
Message-ID: web-690975@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Klatt 2002-02-11 23:18:14 Ignore values on INSERT
Previous Message Michael Klatt 2002-02-11 22:00:12 Read-only attributes