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

From Frank Joerdens
Subject Re: two tables - foreign keys referring to each other...
Date
Msg-id 20010221093815.A20690@rakete.joerdens.de
Whole thread Raw
In response to Re: two tables - foreign keys referring to each other...  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-sql
On Tue, Feb 20, 2001 at 11:34:30PM -0800, Stephan Szabo wrote:
> 
> You have to use ALTER TABLE to add the constraint to one of the tables.

Maybe I am stating the obvious but you should make sure that you include
the ALTER TABLE statements in the *.sql files that you use to create the
tables, rather than running them from the psql prompt. Otherwise you'll
have trouble to figure out what exactly you did when you come back to
the database later; as foreign keys don't show up as 'foreign keys' in
schema dumps, but as a set of <unnamed> triggers. Those are quite hard
to read, or interpret as what they essentially are, i.e. foreign keys
(depending on your philosophical outlook, that is, whether you consider
the essence of your foreign keys to be a set of triggers, or vice versa
;-)).

Regards, Frank


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: two tables - foreign keys referring to each other...
Next
From: "Grigoriy G. Vovk"
Date:
Subject: Re: two tables - foreign keys referring to each other...