Greg Stark <gsstark@mit.edu> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> Actually you are barking up the wrong tree entirely; I'm pretty certain
>> that truncate_useless_pathkeys *doesn't* remove this pathkey, because it
>> should notice that it is relevant to the mergejoin condition.
> No, truncate_useless_pathkeys actually returns NULL.
Mmm, you're right. It would accept the second pathkey if it got to
it --- but it doesn't, because the first pathkey (col1) isn't useful
for any merge condition.
Still, truncate_useless_pathkeys isn't the place to be dealing with this
issue. It's not in a position to generate multiple interpretations of
the same path, which is what we are really after here.
regards, tom lane