David Rowley <dgrowleyml@gmail.com> writes:
> On Wed, 18 Dec 2024 at 12:17, Dmytro Astapov <dastapov@gmail.com> wrote:
>> Surprisingly, this does SeqScan on partB in NestedLoops over some_ids with a filter `some_ids.id = NULL::bigint`:
> TL;DR is it's not a bug and expected behaviour.
The particular case shown here might be fixable by re-applying
eval_const_expressions after we've derived the pushed-down qual.
Most of the time that'd be a waste of cycles though, and I'm
not sure how often it would help.
regards, tom lane