Re: Are circular REFERENCES possible ? - Mailing list pgsql-sql

From David Lizano
Subject Re: Are circular REFERENCES possible ?
Date
Msg-id 5.1.0.14.2.20010807122105.00b8a710@mail.izanet.com
Whole thread Raw
In response to Are circular REFERENCES possible ?  (Denis Bucher <dbucher@niftycom.com>)
List pgsql-sql
>
>
>Which leads to :
>
>CREATE TABLE shops ( id_shop SERIAL PRIMARY KEY, id_cust integer 
>REFERENCES customers, .......)

You can't reference to a table who doesn't exists still.


>CREATE TABLE customers ( id_cust SERIAL PRIMARY KEY, id_defaultshop 
>integer REFERENCES shops, .......)

Perhaps you can do it something like that if:
1.- Create the two tables.
2.- Use alter table to add the constraint "references".




pgsql-sql by date:

Previous
From: "Grigoriy G. Vovk"
Date:
Subject: Re: Are circular REFERENCES possible ?
Next
From: Thomas Good
Date:
Subject: Re: prob with PERL/Postgres