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

From Stephan Szabo
Subject Re: multi column foreign key for implicitly unique columns
Date
Msg-id 20040818073152.W1646@megazone.bigpanda.com
Whole thread Raw
In response to Re: multi column foreign key for implicitly unique columns  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-sql
On Wed, 18 Aug 2004, Jan Wieck wrote:

> On 8/18/2004 9:49 AM, Markus Bertheau wrote:
>
> > В Срд, 18.08.2004, в 15:33, Jan Wieck пишет:
> >
> >> Meaning that not enforcing the uniqueness of those columns isn't an
> >> option.
> >
> > The thing is that the columns _are_ unique, there's just no unique
> > constraint on them. They are unique because there's a unique constraint
> > on a subset of these columns. So no additional uniqueness enforcing
> > needed.
> >
>
> Yes, you are right, a superset of columns of a unique constraint is
> allways unique as well.

True, but the spec explicitly asks for the columns to be the members of a
unique constraint, not that the columns be provably unique.  See the other
portion of the thread related to dropping constraints for other spec
extensions doing this implies. I think the actual specific change to make
it look for the subset should be trivial, but we'd really need to work
out those dependency issues at the very least and I'm afraid there are
more such little corners.



pgsql-sql by date:

Previous
From: Markus Bertheau
Date:
Subject: Re: multi column foreign key for implicitly unique columns
Next
From: Gaetano Mendola
Date:
Subject: Re: SQL Challenge: Arbitrary Cross-tab