-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, Nov 01, 2006 at 07:16:37PM -0300, Alvaro Herrera wrote:
> tomas@tuxteam.de wrote:
[...]
> > a "functional trigram index"? (this would be very cool).
>
> Heh :-) I meant an index, using the pg_trgm opclass (which indexes
> trigrams; hence the "trigram" part), on a function that would extract
> the text from a bytea column [...]
[goes back to cave, tests...]
Wow, that works:
CREATE INDEX i2 ON words USING gist(lower(word) gist_trgm_ops);
so I can interpose a (of course immutable) function before gist/trigram
does its thing. Why didn't I dare to assume that this will work?
Thanks for the hint.
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFFScGvBcgs9XrR2kYRAl9tAJ9JvWvVo0nrexs409IIKPustuJkXwCbBW5n
W5/wwTogiSdg3rhTXq5pRio=
=t90X
-----END PGP SIGNATURE-----