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

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Kaiting Chen <ktchen14(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Cc: hellopfm(at)gmail(dot)com
Subject: Re: Allow foreign keys to reference a superset of unique columns
Date: 2022-06-10 03:08:31
Message-ID: bdd9b068-e6ec-1227-1b73-a74773159590@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07.06.22 20:59, Kaiting Chen wrote:
> 2. The FOREIGN KEY constraint syntax gains a [ USING INDEX index_name ] clause
> optionally following the referenced column list.
>
> The index specified by this clause is used to support the foreign key
> constraint, and it must be a non-deferrable unique or primary key index on
> the referenced table compatible with the referenced columns.
>
> Here, compatible means that the columns of the index are a subset (the same,
> or a strict subset) of the referenced columns.

I think this should be referring to constraint name, not an index name.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2022-06-10 03:47:34 Re: Allow foreign keys to reference a superset of unique columns
Previous Message Peter Geoghegan 2022-06-10 01:47:54 Re: Collation version tracking for macOS