Re: query planner does not canonicalize infix operators

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Will Leinweber <will(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: query planner does not canonicalize infix operators
Date: 2012-03-12 14:52:33
Message-ID: 17479.1331563953@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Will Leinweber <will(at)heroku(dot)com> writes:
> I created an index on an hstore function, fetchval(hstore, text), however
> when I use the -> infix operator which resolves to the very same function,
> this index is not used. It should be used.

Don't hold your breath. Create an index on the expression you intend to
use, not random respellings of it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kohei KaiGai 2012-03-12 14:58:03 Re: [v9.2] Add GUC sepgsql.client_label
Previous Message Kohei KaiGai 2012-03-12 14:42:24 Re: [v9.2] Add GUC sepgsql.client_label