From: jdassen@cistron.nl
To: pgsql-sql@postgresql.org
Subject: Re: two tables - foreign keys referring to each other...]
Date: Thu, 22 Feb 2001 17:11:37 +0000 (UTC)
Message-ID: <slrn99ahvo.c24.jdassen@odin.cistron-office.nl> (raw)
References: <3A93EFDF.C4FC5689@agliodbs.com>
Josh Berkus <josh@agliodbs.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: jdassen@cistron.nl
Subject: Re: two tables - foreign keys referring to each other...]
In-Reply-To: <slrn99ahvo.c24.jdassen@odin.cistron-office.nl>
References: <3A93EFDF.C4FC5689@agliodbs.com> <slrn99ahvo.c24.jdassen@odin.cistron-office.nl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox