From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Indexing Metaphone?
Date: Wed, 5 Jun 2002 12:15:52 -0700 (PDT)
Message-ID: <20020605121507.B16840-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <200206051112.02090.josh@agliodbs.com>
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. :)
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: sszabo@megazone23.bigpanda.com, josh@agliodbs.com
Subject: Re: Indexing Metaphone?
In-Reply-To: <20020605121507.B16840-100000@megazone23.bigpanda.com>
* 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