Re: BUG #19007: Planner fails to choose partial index with spurious 'not null'

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: BUG #19007: Planner fails to choose partial index with spurious 'not null'
Дата
Msg-id CAMbWs4-rmHTz0Txt813WUpZe_5U9DEPMRVsFiVFs2C4TXJ8qiA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #19007: Planner fails to choose partial index with spurious 'not null'  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Mon, Aug 4, 2025 at 2:19 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> (I'm also quite displeased that e2debb643 didn't nuke
> restriction_is_always_true/false.  But that's a separate discussion.)

Hmm, I tried to do that in e2debb643, but failed, as the commit
message explains:

    Note that this patch does not get rid of restriction_is_always_true
    and restriction_is_always_false.  Removing them would prevent us from
    reducing some IS [NOT] NULL quals that we were previously able to
    reduce, because (a) the self-join elimination may introduce new IS NOT
    NULL quals after constant folding, and (b) if some outer joins are
    converted to inner joins, previously irreducible NullTest quals may
    become reducible.

Thanks
Richard



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