Re: Indexing Metaphone?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Indexing Metaphone?
Date: 2002-06-05 19:15:52
Message-ID: 20020605121507.B16840-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, 5 Jun 2002, Josh Berkus wrote:

> Folks,
>
> I'm building a database that does a lot of fuzzy-string searches. As such,
> I'd like to index the metaphone results of certain columns. However, I get
> this when I try:
>
> jwnet=> CREATE INDEX idx_locations_metaphone ON
> locations(metaphone(location_name, 12));
> ERROR: parser: parse error at or near "12"

Functional indexes only take columns as arguments IIRC. Make
a cachable function that returns metaphone($1, 12) given the
appropriate type and index/use that. :)

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ludwig Lim 2002-06-06 03:33:41 Re: simple select statement inquiry
Previous Message Josh Berkus 2002-06-05 18:53:32 Re: Indexing Metaphone?