> > >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". ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
- [SQL] Are circular REFERENCES possible ? Denis Bucher
- Re: [SQL] Are circular REFERENCES possible ? Grigoriy G. Vovk
- Re: [SQL] Are circular REFERENCES possible ? David Lizano
- Re: [SQL] Are circular REFERENCES possible ? Josh Berkus
- Re: [SQL] Are circular REFERENCES possible ? Gary Stainburn
- Re: [SQL] Are circular REFERENCES possible ? Stephan Szabo
- Re: [SQL] Are circular REFERENCES possible ? Jan Wieck
- Re: [SQL] Are circular REFERENCES possible ? Josh Berkus
- Re: [SQL] Are circular REFERENCES possible ? Jan Wieck
- Re: [SQL] Are circular REFERENCES possible ? Tom Lane
- Re: [SQL] Are circular REFERENCES possible ? Jan Wieck
- Re: [SQL] Are circular REFERENCES possible ? Gary Stainburn