Re: Reduce "Var IS [NOT] NULL" quals during constant folding

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Reduce "Var IS [NOT] NULL" quals during constant folding
Дата
Msg-id CAMbWs484o7ZFN_sau09X60GPN8RE12VakD-mtQF482VZk2=4RQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Reduce "Var IS [NOT] NULL" quals during constant folding  (Tender Wang <tndrwang@gmail.com>)
Ответы Re: Reduce "Var IS [NOT] NULL" quals during constant folding
Список pgsql-hackers
On Wed, Mar 26, 2025 at 3:06 PM Tender Wang <tndrwang@gmail.com> wrote:
> The comment about  notnullattnums in struct RangeTblEntry says that:
> * notnullattnums is zero-based set containing attnums of NOT NULL
> * columns.
>
> But in get_relation_notnullatts():
> rte->notnullattnums = bms_add_member(rte->notnullattnums,
>                                                                     i + 1);
>
> The notnullattnums seem to be 1-based.

This corresponds to the attribute numbers in Var nodes; you can
consider zero as representing a whole-row Var.

Thanks
Richard



В списке pgsql-hackers по дате отправления: