Re: two tables - foreign keys referring to each other...]

From: jdassen(at)cistron(dot)nl (J(dot)H(dot)M(dot) Dassen (Ray))
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: two tables - foreign keys referring to each other...]
Date: 2001-02-22 17:11:37
Message-ID: slrn99ahvo.c24.jdassen@odin.cistron-office.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jeff MacDonald 2001-02-22 19:55:03 bug.. ?
Previous Message Kajetan Kazimierczak 2001-02-22 16:44:56 Re: Re: what means "INSERT xxx yyy" ?