Re: Index to support LIKE '%suffix' queries - Mailing list pgsql-sql

From A. Kretschmer
Subject Re: Index to support LIKE '%suffix' queries
Date
Msg-id 20060301113301.GD9939@webserv.wug-glas.de
Whole thread Raw
In response to Re: Index to support LIKE '%suffix' queries  (Florian Weimer <fw@deneb.enyo.de>)
List pgsql-sql
am  01.03.2006, um  8:19:40 +0100 mailte Florian Weimer folgendes:
> * Alvaro Herrera:
> 
> >> > Florian Weimer <fw@deneb.enyo.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    === 


pgsql-sql by date:

Previous
From: Florian Weimer
Date:
Subject: Re: Index to support LIKE '%suffix' queries
Next
From: "Simon Kinsella"
Date:
Subject: Help with trigger that updates a row prior to a potentially aborted deletion?