Re: index scan with functional indexes

Stephan Szabo <sszabo@megazone.bigpanda.com>

From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2004-01-27T18:01:07Z
Lists: pgsql-hackers
On Tue, 27 Jan 2004, Dave Cramer wrote:

> same answer
>
> davec=# show enable_seqscan;
>  enable_seqscan
> ----------------
>  off
> (1 row)
>
> davec=# explain analyze select * from url where fn_strrev(url) like
> '%beta12.html';

That's still an unanchored like clause, besides I think that would get
urls that begin with lmth.21ateb.

I think the condition you want would be:
fn_strrev(url) like 'lmth.21ateb%'