Received: from ncc1701.cistron.net (ncc1701.cistron.net [195.64.68.38]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1MHAIx69317 for ; Thu, 22 Feb 2001 12:10:19 -0500 (EST) (envelope-from news@uucp.cistron.nl) Received: from news by ncc1701.cistron.net with local (Exim 3.20 #1 (Debian)) id 14VzHG-0003pQ-00 for ; Thu, 22 Feb 2001 18:11:38 +0100 From: jdassen@cistron.nl (J.H.M. Dassen (Ray)) Subject: Re: two tables - foreign keys referring to each other...] Date: Thu, 22 Feb 2001 17:11:37 +0000 (UTC) Organization: Cistron Internet Services B.V. Lines: 14 Message-ID: References: <3A93EFDF.C4FC5689@agliodbs.com> X-Trace: ncc1701.cistron.net 982861897 12970 195.64.65.236 (22 Feb 2001 17:11:37 GMT) X-Complaints-To: abuse@cistron.nl To: pgsql-sql@postgresql.org Errors-To: news@news.cistron.nl X-Archive-Number: 200102/339 X-Sequence-Number: 1535 Josh Berkus wrote: >In fact, if you built your two-way foriegn keys (using ALTER TABLE), I >think you might find that you can't add any records to either table. >Certainly you won't be able to delete any. It can be done: use DEFERRABLE foreign key constraints (see http://www.postgresql.org/docs/aw_pgsql_book/node161.html) Ray -- Personally, I guess I'd favor a sort of modified form of medieval justice. The idea is that you throw the lawyers for both parties into a pond. The person whose lawyer sinks would be declared the winner. Rob Kleinschmidt