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

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Reduce "Var IS [NOT] NULL" quals during constant folding
Дата
Msg-id CAMbWs4_e05j-O+FtGnuDNXeWb72G_vSfvnB+vOnNp2_sKeaU2w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Reduce "Var IS [NOT] NULL" quals during constant folding  (Junwang Zhao <zhjwpku@gmail.com>)
Ответы Re: Reduce "Var IS [NOT] NULL" quals during constant folding
Список pgsql-hackers
On Sun, Sep 7, 2025 at 8:12 PM Junwang Zhao <zhjwpku@gmail.com> wrote:
> While reading this thread, I found that it uses *Relids* to collect NOT NULL
> attribute numbers, I think this might be an oversight, since ISTM that
> Relids is used to represent the index of the relation in the range table.

Nice catch; it's better to use Bitmapset * rather than Relids in this
scenario.  That was my oversight; will fix it.

> So I think it would be better to be consistent, anyway I post a trivial patch
> if the community agrees with me.

Your patch misses one spot: the notnullattnums in
get_relation_notnullatts() should also be fixed.  Otherwise it LGTM.

- Richard



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