Re: Are circular REFERENCES possible ?

From: David Lizano <david(dot)lizano(at)izanet(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Are circular REFERENCES possible ?
Date: 2001-08-07 10:26:09
Message-ID: 5.1.0.14.2.20010807122105.00b8a710@mail.izanet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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".

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas Good 2001-08-07 11:42:29 Re: prob with PERL/Postgres
Previous Message Grigoriy G. Vovk 2001-08-07 10:16:47 Re: Are circular REFERENCES possible ?