* Alvaro Herrera:

>> > 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.

Okay.  Is there a predefined reverse function?  I couldn't find one
and I'm wondering if I just missed it.

> Whether or not this beats tsearch2 is something you should investigate ...

It's also possible that for this type of query, sequential scans are
good enough.  I forgot that they are quite fast.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to