pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: pgsql-sql@postgresql.org
Subject: Index to support LIKE '%suffix' queries
Date: Sat, 25 Feb 2006 15:17:41 +0100
Message-ID: <87mzgfh69m.fsf@mid.deneb.enyo.de> (raw)

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)?

I could define a function which reverts strings (or revert them in the
application) and use a normal B-tree index, but I wonder if there is a
better way.



view thread (6+ messages)  latest in thread

Message-ID: <87mzgfh69m.fsf@mid.deneb.enyo.de>
Permalink:  ../87mzgfh69m.fsf@mid.deneb.enyo.de/
Also on:    postgresql.org/message-id/87mzgfh69m.fsf@mid.deneb.enyo.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: fw@deneb.enyo.de
  Subject: Re: Index to support LIKE '%suffix' queries
  In-Reply-To: <87mzgfh69m.fsf@mid.deneb.enyo.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox