From: | Franco Bruno Borghesi <franco(at)akyasociados(dot)com(dot)ar> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: mysql create table -> psql |
Date: | 2003-09-09 14:06:20 |
Message-ID: | 1063116380.10324.8.camel@taz.oficina |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
the problem is
constraint id PRIMARY (id), it should be constraint id PRIMARY KEY (id).
Besides that, you will have problems with '0000-00-00'... month starts
at 1, day starts at 1, and I don't know about year 0. Maybe this field
'time' should be NULLable, or maybe its default value should be
'0001-01-01 00:00:00'.
On Tue, 2003-09-09 at 03:10, expect wrote:
> Hello,
>
> Trying to get this MySql create table command to work, no luck.
>
> create sequence serial;
>
> CREATE TABLE outbound (
> source char(100) default '',
> destination char(100) default '',
> sport int4 default 0 NOT NULL,
> dport int4 NOT NULL default 0,
> time timestamp NOT NULL default '0000-00-00 00:00:00',
> id int8 default nextval('serial') not null,
> constraint id PRIMARY (id)
> );
>
>
> I get a parse error:
> ERROR: parser: parse error at or near "(" at character 279
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
From | Date | Subject | |
---|---|---|---|
Next Message | Dennis Gearon | 2003-09-09 14:10:52 | Re: German special characters Problem |
Previous Message | Jonathan Bartlett | 2003-09-09 13:44:16 | Re: Views and Limits |