Re: mysql create table -> psql - Mailing list pgsql-general

From Franco Bruno Borghesi
Subject Re: mysql create table -> psql
Date
Msg-id 1063116380.10324.8.camel@taz.oficina
Whole thread Raw
In response to mysql create table -> psql  (expect <expect@ihubbell.com>)
List 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
Attachment

pgsql-general by date:

Previous
From: Jonathan Bartlett
Date:
Subject: Re: Views and Limits
Next
From: Dennis Gearon
Date:
Subject: Re: German special characters Problem