"Andrus" <kobruleht2@hot.ee> writes:
>> The IN-pullup code runs before constant-simplification does, so it
>> doesn't see that as a simple join condition.
> Seems serious design flaw.
> How to change expression parser so that contant parts of expressions are
> removed before IN-pullup?
It would be far simpler to fix your query generator to not emit the
useless "0 or".
Even if we made the planner deal with that, the number of cycles it
would expend to recover from the generator's stupidity would be several
orders of magnitude higher than the number of cycles needed to not be so
stupid.
regards, tom lane