Re: two tables - foreign keys referring to each other...] - Mailing list pgsql-sql

From jdassen@cistron.nl (J.H.M. Dassen (Ray))
Subject Re: two tables - foreign keys referring to each other...]
Date
Msg-id slrn99ahvo.c24.jdassen@odin.cistron-office.nl
Whole thread Raw
In response to two tables - foreign keys referring to each other...]  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
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 



pgsql-sql by date:

Previous
From: "Richard Huxton"
Date:
Subject: Re: problem with dates
Next
From: Bjørn T Johansen
Date:
Subject: Strange parse error??