Re: foreign key constraint - Mailing list pgsql-general

From Stephan Szabo
Subject Re: foreign key constraint
Date
Msg-id 20030304081751.N53493-100000@megazone23.bigpanda.com
Whole thread Raw
In response to foreign key constraint  (Dennis Gearon <gearond@cvc.net>)
List pgsql-general
On Tue, 4 Mar 2003, Dennis Gearon wrote:

> OR, how is it possible to add foreign key constraints, ('cross constraints'), between two tables.
> I tried it in a transaction, but it didn't work. The first  constraint in the table definition
> was DEFERRABLE INITIALLY DEFERRED, but I don't think the parser cared :-) I got this error:

Tom dealt with the first part.  I'll deal with this one.  The initially
deferred refers to the the check time of the constraint, however to make
the constraint requires the table to be there.  I think this is defensible
since you need permissions at the table constraint creation time on the
other table which is pretty much impossible if it doesn't exist. :)


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: foreign key constraint
Next
From: "scott.marlowe"
Date:
Subject: Re: Q from new user about postgresql?