Re: BUG #5084: Query gives different number of rows depending on ORDER BY - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5084: Query gives different number of rows depending on ORDER BY
Date
Msg-id 15833.1254179427@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #5084: Query gives different number of rows depending on ORDER BY  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: BUG #5084: Query gives different number of rows depending on ORDER BY  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-bugs
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>  Tom> I'm inclined to think that the best solution is to have
>  Tom> process_equivalence just reject any clauses that have equal()
>  Tom> left and right sides, ie, throw them back to be processed as
>  Tom> ordinary non-equivalence clauses.

> Hmm. Is it ever possible for mergejoinable operators to be non-strict?
> Does that matter?

I'm not sure. ISTR that nodeMergejoin makes some effort to support such
operators, but the btree code doesn't really.  In any case, it doesn't
matter.  Leaving the clause out of the equivalence machinery is
certainly safe; at worst we'll end up with a redundant test or two in
the final plan.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: BUG #5084: Query gives different number of rows depending on ORDER BY
Next
From: Andrew Gierth
Date:
Subject: Re: BUG #5084: Query gives different number of rows depending on ORDER BY