Received: from correo.servidoresdns.net (correo.servidoresdns.net [195.55.179.56]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f77AOp689349 for ; Tue, 7 Aug 2001 06:24:51 -0400 (EDT) (envelope-from david.lizano@izanet.com) Received: from servidornt.izanet.com [213.97.9.38] by correo.servidoresdns.net with ESMTP (SMTPD32-6.06) id A0E4FD0254; Tue, 07 Aug 2001 12:20:20 +0200 Message-Id: <5.1.0.14.2.20010807122105.00b8a710@mail.izanet.com> X-Sender: sj7010@mail.izanet.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 07 Aug 2001 12:26:09 +0200 To: pgsql-sql@postgresql.org From: David Lizano Subject: Re: Are circular REFERENCES possible ? In-Reply-To: <5.1.0.14.0.20010807114609.00a18490@mail.niftycom.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200108/93 X-Sequence-Number: 4314 > > >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".