Re: [pg_trgm] Making similarity(?, ?) < ? use an index - Mailing list pgsql-general

From Tom Lane
Subject Re: [pg_trgm] Making similarity(?, ?) < ? use an index
Date
Msg-id 13882.1465481574@sss.pgh.pa.us
Whole thread Raw
In response to Re: [pg_trgm] Making similarity(?, ?) < ? use an index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I wrote:
> Greg Navis <contact@gregnavis.com> writes:
>> I'm not sure how to make this operator use an index. It seems I need to
>> create an operator class but I'm not sure how.

> What you'd want to do is add it to the existing operator class and then
> teach the class's support functions (mostly, the "consistent" function)
> about it.

BTW, you'd probably find this patch instructive:

https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=f576b17cd6ba653bdace1f0da9a3b57f4984e460

although it's doing more than just adding one operator.

            regards, tom lane


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [pg_trgm] Making similarity(?, ?) < ? use an index
Next
From: Bryan Henderson
Date:
Subject: Re: Why threads every 30 seconds?