pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: Index to support LIKE '%suffix' queries
Date: Sat, 25 Feb 2006 12:22:27 -0500
Message-ID: <11673.1140888147@sss.pgh.pa.us> (raw)
In-Reply-To: <87mzgfh69m.fsf@mid.deneb.enyo.de>
References: <87mzgfh69m.fsf@mid.deneb.enyo.de>

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

Sounds like what you *really* need is full-text search, not half
measures ... have you looked at tsearch2?

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <11673.1140888147@sss.pgh.pa.us>
Permalink:  ../11673.1140888147@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11673.1140888147@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, fw@deneb.enyo.de
  Subject: Re: Index to support LIKE '%suffix' queries
  In-Reply-To: <11673.1140888147@sss.pgh.pa.us>

* 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