X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C60A89DCAC7 for ; Sat, 25 Feb 2006 13:22:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26401-01 for ; Sat, 25 Feb 2006 13:22:31 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 971F69DCAA5 for ; Sat, 25 Feb 2006 13:22:30 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k1PHMRQZ011674; Sat, 25 Feb 2006 12:22:27 -0500 (EST) To: Florian Weimer cc: pgsql-sql@postgresql.org Subject: Re: Index to support LIKE '%suffix' queries In-reply-to: <87mzgfh69m.fsf@mid.deneb.enyo.de> References: <87mzgfh69m.fsf@mid.deneb.enyo.de> Comments: In-reply-to Florian Weimer message dated "Sat, 25 Feb 2006 15:17:41 +0100" Date: Sat, 25 Feb 2006 12:22:27 -0500 Message-ID: <11673.1140888147@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.111 required=5 tests=[AWL=0.111] X-Spam-Score: 0.111 X-Spam-Level: X-Archive-Number: 200602/316 X-Sequence-Number: 24326 Florian Weimer 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