On 13 October 2017 at 02:17, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> I propose this slightly larger change.
hmm, this is not right. You're not checking that there's a Var below
the RelabelType.
I tried with:
explain select * from ab where (a||a)::varchar = '' and b = '';
and your code assumed the OpExpr was a Var.
The reason Tomas coded it the way it was coded is due to the fact that
there's already code that works exactly the same way in
clauselist_selectivity(). Personally, I don't particularly like that
code, but I'd rather not invent a new way to do the same thing.
-- David Rowley http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers