Re: create table error - Mailing list pgsql-novice

From Michael Glaesemann
Subject Re: create table error
Date
Msg-id E1A44C0F-058A-11D9-9715-000A95C88220@myrealbox.com
Whole thread Raw
In response to Re: create table error  (Kumar S <ps_postgres@yahoo.com>)
List pgsql-novice
On Sep 13, 2004, at 10:35 PM, Kumar S wrote:
> create table contacts
> (
>      con_id    serial   ,
>      exp_id    serial   REFERENCES experiment,
>      con_lname  varchar(32) ,
>      con_fname  varchar(32) ,
>      con_addressline  varchar (64),
>      con_zip    varchar(16)  ,
> );
> Is there some problem with these sql statements.

Yes. You have an extra comma following the line beginning con_zip. The
last line of the table definition should not be followed by a comma.

I suspect you're also going to have trouble with the exp_id serial
references experiment line. You probably don't want a default on a
column that needs to match a value in another table.

Hope that helps.

Also, please do not start a new thread by replying to a different
message. Create a new message instead.

Michael Glaesemann
grzm myrealbox com


pgsql-novice by date:

Previous
From: Devrim GUNDUZ
Date:
Subject: Re: create table error
Next
From: Betsy Barker
Date:
Subject: LockAcquire: lock table 1 is out of memory