Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition)

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition)
Дата
Msg-id
731873.1661277613@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Self FK oddity when attaching a partition Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
[BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Alvaro Herrera <alvherre@alvh.no-ip.org>
[BUG] wrong FK constraint name when colliding name on ATTACH Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Re: [BUG] wrong FK constraint name when colliding name on ATTACH Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Re: [BUG] wrong FK constraint name when colliding name on ATTACH Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [BUG] wrong FK constraint name when colliding name on ATTACH Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Re: [BUG] wrong FK constraint name when colliding name on ATTACH Andres Freund <andres@anarazel.de>
Re: [BUG] wrong FK constraint name when colliding name on ATTACH Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUG] wrong FK constraint name when colliding name on ATTACH Amit Langote <amitlangote09@gmail.com>
Re: [BUG] wrong FK constraint name when colliding name on ATTACH Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Zhihong Yu <zyu@yugabyte.com>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Zhihong Yu <zyu@yugabyte.com>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Zhihong Yu <zyu@yugabyte.com>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition) Zhihong Yu <zyu@yugabyte.com>
Alvaro Herrera  writes:
> If this is OK, we should make this API quirkiness very explicit in the
> comments, so the patch needs to be a few lines larger in order to be
> committable.  Also, perhaps the check should be that contype equals
> either primary or unique, rather than it doesn't equal foreign.

Yeah.  See lsyscache.c's get_constraint_index(), as well as commit
641f3dffc which fixed a mighty similar-seeming bug.  One question
that precedent raises is whether to also include CONSTRAINT_EXCLUSION.
But in any case a positive test for the constraint types to allow
seems best.

			regards, tom lane


В списке pgsql-hackers по дате отправления
От: Marina Polyakova
Дата:
Сообщение: Re: ICU for global collation
От: Nathan Bossart
Дата:
FAQ