Re: Fuzzy substring searching with the pg_trgm extension - Mailing list pgsql-hackers

From Artur Zakirov
Subject Re: Fuzzy substring searching with the pg_trgm extension
Date
Msg-id 56A0A1C1.4050707@postgrespro.ru
Whole thread Raw
In response to Re: Fuzzy substring searching with the pg_trgm extension  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Fuzzy substring searching with the pg_trgm extension  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers
On 21.01.2016 00:25, Alvaro Herrera wrote:
> Artur Zakirov wrote:
>>
>> Added GUC variables:
>> - pg_trgm.limit
>> - pg_trgm.substring_limit
>> I added this variables to the documentation.
>> show_limit() and set_limit() functions work correctly and they are marked as
>> deprecated.
>
> Thanks.  I'm willing to commit quickly a small patch that only changes
> the existing function to GUCs, then have a look at a separate patch that
> adds the new substring operator.  Would you split the patch that way?
>

Sure. I attached two patches. But notice that pg_trgm.limit should be
used with this command:

SHOW "pg_trgm.limit";

If you will use this command:

SHOW pg_trgm.limit;

you will get the error:

ERROR:  syntax error at or near "limit"
LINE 1: SHOW pg_trgm.limit;
                      ^

This is because "limit" is keyword I think.
If it is important then GUC variables can have names:

- pg_trgm.sml_limit
- pg_trgm.substring_sml_limit

--
Artur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company

Attachment

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Odd behavior in foreign table modification (Was: Re: Optimization for updating foreign tables in Postgres FDW)
Next
From: Stas Kelvich
Date:
Subject: Re: Patch: ResourceOwner optimization for tables with many partitions