Re: Index to support LIKE '%suffix' queries

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Index to support LIKE '%suffix' queries
Date: 2006-03-01 11:33:01
Message-ID: 20060301113301.GD9939@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

am 01.03.2006, um 8:19:40 +0100 mailte Florian Weimer folgendes:
> * Alvaro Herrera:
>
> >> > Florian Weimer <fw(at)deneb(dot)enyo(dot)de> 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.

simple to write one, http://a-kretschmer.de/diverses.shtml

HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47215, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Simon Kinsella 2006-03-01 13:30:23 Help with trigger that updates a row prior to a potentially aborted deletion?
Previous Message Mauricio Fernandez A. 2006-03-01 10:17:15 Re: how to add primary key to existing table with multiple primary keys