| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> | 
|---|---|
| To: | Zhihong Yu <zyu(at)yugabyte(dot)com> | 
| Cc: | Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) | 
| Date: | 2022-08-23 17:50:59 | 
| Message-ID: | 20220823175059.vkxm7dtzv26zmwzs@alvherre.pgsql | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On 2022-Aug-23, Zhihong Yu wrote:
> A bigger question I have, even with the additional filtering, is what if
> there are multiple constraints ?
> How do we decide which unique / primary key constraint to return ?
> 
> Looks like there is no known SQL statements leading to such state, but
> should we consider such possibility ?
I don't think we care, but feel free to experiment and report any
problems.  You should be able to have multiple UNIQUE constraints on the
same column, for example.
-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Postgres is bloatware by design: it was built to house
 PhD theses." (Joey Hellerstein, SIGMOD annual conference 2002)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2022-08-23 17:53:22 | Re: handling multiple matching constraints in DetachPartitionFinalize() | 
| Previous Message | Nathan Bossart | 2022-08-23 17:49:40 | Re: add checkpoint stats of snapshot and mapping files of pg_logical dir |