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

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition)
Дата
Msg-id
20221103194416.sdp75teipw4i5hri@alvherre.pgsql
Ответ на
Список
Дерево обсуждения
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>
On 2022-Oct-05, Alvaro Herrera wrote:

> I've been giving the patches a look and it caused me to notice two
> additional bugs in the same area:
> 
> - FKs in partitions are sometimes marked NOT VALID.  This is because of
>   missing initialization when faking up a Constraint node in
>   CloneFkReferencing.  Easy to fix, have patch, running tests now.

I have pushed the fix for this now.

> - The feature added by d6f96ed94e73 (ON DELETE SET NULL (...)) is not
>   correctly propagated.  This should be an easy fix also, haven't tried,
>   need to add a test case.

There was no bug here actually: it's true that the struct member is left
uninitialized, but in practice that doesn't matter, because the set of
columns is propagated separately from the node.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Las navajas y los monos deben estar siempre distantes"   (Germán Poo)


В списке pgsql-hackers по дате отправления
От: Jonathan S. Katz
Дата:
От: Daniel Gustafsson
Дата:
FAQ