Re: Wrong results: NOT IN to anti-join with an upper-level Var in the sub-select's output - Mailing list pgsql-hackers

From Rui Zhao
Subject Re: Wrong results: NOT IN to anti-join with an upper-level Var in the sub-select's output
Date
Msg-id CAHWVJhFDgAjcJscH5E2zCF1814eidMS_1xiJy7R-RMG7hHBF_w@mail.gmail.com
Whole thread
In response to Re: Wrong results: NOT IN to anti-join with an upper-level Var in the sub-select's output  (Tender Wang <tndrwang@gmail.com>)
List pgsql-hackers
Hi Tender,

Thanks for looking.  Moved the comment ahead of the test and left the one
inside the if alone, as you suggested; v2 attached.  make check is still green
and the test still fails without the code change.

Just to be clear about what the check costs us: nothing that works today.
expr_is_nonnullable() already declines upper-level Vars, so the only way the
fallback was reaching one was by matching it against a local Var of an
unrelated relation -- there was never a correct conversion there to lose.  And
proving an upper-level output non-null would take the outer query's range
table, which query_outputs_are_not_nullable() isn't given, so that would want a
different mechanism rather than a relaxation of this test.

Thanks,
Rui

Attachment

pgsql-hackers by date:

Previous
From: "Matheus Alcantara"
Date:
Subject: Re: hashjoins vs. Bloom filters (yet again)
Next
From: Nathan Bossart
Date:
Subject: Re: glibc qsort() vulnerability