> > Florian Weimer <[EMAIL PROTECTED]> writes: > >> Is it possible to create an index to support queries of the form > >> "column LIKE '%suffix'" (similar to an ordinary index for LIKE > >> 'prefix%', which I also need)?
It is possible to create a functional index on the reverse of the string. You need to also reverse the patter at query-time as well. This will make the % be at the end of the pattern, making it an indexable condition. Whether or not this beats tsearch2 is something you should investigate ... -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org