Re: index scan with functional indexes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: index scan with functional indexes
Date
Msg-id 24803.1075226571@sss.pgh.pa.us
Whole thread Raw
In response to Re: index scan with functional indexes  (Dave Cramer <pg@fastcrypt.com>)
Responses Re: index scan with functional indexes  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-hackers
Dave Cramer <pg@fastcrypt.com> writes:
> davec=# explain analyze select * from url where fn_strrev(url) like
> '%beta12.html';

Don't you need the % at the right end to have an indexable plan?
I suspect that both of your tries so far are actually semantically
wrong, and that what you intend is

select * from url where fn_strrev(url) like fn_strrev('%beta12.html');
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: index scan with functional indexes
Next
From: Tom Lane
Date:
Subject: Re: Another optimizer question