Re: Allow foreign keys to reference a superset of unique columns

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Kaiting Chen <ktchen14(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, hellopfm(at)gmail(dot)com
Subject: Re: Allow foreign keys to reference a superset of unique columns
Date: 2022-06-10 04:14:11
Message-ID: 69444397-d537-5276-92be-8930df278098@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10.06.22 05:47, David Rowley wrote:
>> I think this should be referring to constraint name, not an index name.
> Can you explain why you think that?

If you wanted to specify this feature in the SQL standard (I'm not
proposing that, but it seems plausible), then you need to deal in terms
of constraints, not indexes. Maybe referring to an index directly could
be a backup option if desired, but I don't see why that would be
necessary, since you can easily create a real constraint on top of an index.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-06-10 04:24:04 Re: Multi-Master Logical Replication
Previous Message David Rowley 2022-06-10 03:47:34 Re: Allow foreign keys to reference a superset of unique columns