Re: multi column foreign key for implicitly unique columns - Mailing list pgsql-sql

From Markus Bertheau
Subject Re: multi column foreign key for implicitly unique columns
Date
Msg-id 1092754658.2627.32.camel@dicaprio.akademie1.de
Whole thread Raw
In response to Re: multi column foreign key for implicitly unique columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: multi column foreign key for implicitly unique columns
List pgsql-sql
В Втр, 17.08.2004, в 16:46, Tom Lane пишет:

> I think one reason for this is that otherwise it's not clear which
> unique constraint the FK constraint depends on.  Consider
>
>     create table a (f1 int unique, f2 int unique);
>
>     create table b (f1 int, f2 int,
>             foreign key (f1,f2) references a(f1,f2));
>
> How would you decide which constraint to make the FK depend on?

Either way, the semantics are the same, right?

--
Markus Bertheau <twanger@bluetwanger.de>



pgsql-sql by date:

Previous
From: Markus Bertheau
Date:
Subject: Re: SELECT MAX(c) FROM (SELECT ... FOR UPDATE) AS foo
Next
From: Stephan Szabo
Date:
Subject: Re: multi column foreign key for implicitly unique columns