Re: Incorrect handling of IS [NOT] NULL quals on inheritance parents

Поиск
Список
Период
Сортировка
Искать
От
David Rowley
Тема
Re: Incorrect handling of IS [NOT] NULL quals on inheritance parents
Дата
Msg-id
CAApHDvo9U51PK3YeNOPYOOVpfvZvBK-XABegueEH==2WoHwKiQ@mail.gmail.com
Ответ на
Список
Дерево обсуждения
[MASSMAIL]Incorrect handling of IS [NOT] NULL quals on inheritance parents Richard Guo <guofenglinux@gmail.com>
Re: Incorrect handling of IS [NOT] NULL quals on inheritance parents David Rowley <dgrowleyml@gmail.com>
Re: Incorrect handling of IS [NOT] NULL quals on inheritance parents Tom Lane <tgl@sss.pgh.pa.us>
Re: Incorrect handling of IS [NOT] NULL quals on inheritance parents David Rowley <dgrowleyml@gmail.com>
Re: Incorrect handling of IS [NOT] NULL quals on inheritance parents Richard Guo <guofenglinux@gmail.com>
Re: Incorrect handling of IS [NOT] NULL quals on inheritance parents David Rowley <dgrowleyml@gmail.com>
Re: Incorrect handling of IS [NOT] NULL quals on inheritance parents Richard Guo <guofenglinux@gmail.com>
Re: Incorrect handling of IS [NOT] NULL quals on inheritance parents David Rowley <dgrowleyml@gmail.com>
Re: Incorrect handling of IS [NOT] NULL quals on inheritance parents Richard Guo <guofenglinux@gmail.com>
On Wed, 10 Apr 2024 at 17:18, Tom Lane  wrote:
>
> David Rowley  writes:
> > I think a better fix is just to not apply the optimisation for
> > inheritance RTEs in add_base_clause_to_rel().
>
> Is it worth paying attention to whether the constraint is marked
> connoinherit?  If that involves an extra syscache fetch, I'd tend to
> agree that it's not worth it; but if we can get that info for free
> it seems worthwhile to not break this for inheritance cases.

I think everything should be optimised as we like without that.
Effectively get_relation_info() looks at the pg_attribute.attnotnull
column for the relation in question. We never look at the
pg_constraint record to figure out the nullability of the column.

David


В списке pgsql-hackers по дате отправления
От: Amit Kapila
Дата:
От: jian he
Дата:
FAQ