Re: pgsql: GUC variable pg_trgm.similarity_threshold insead of set_limit()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: GUC variable pg_trgm.similarity_threshold insead of set_limit()
Date: 2016-03-17 17:11:52
Message-ID: 1964.1458234712@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Teodor Sigaev <teodor(at)sigaev(dot)ru> writes:
> GUC variable pg_trgm.similarity_threshold insead of set_limit()

If that's to be an actual GUC variable, it's not okay for set_limit()
to just do this:

similarity_threshold = nlimit;

It should go through SetConfigOption(); compare for example
tsa_set_curcfg_byname(). Which would also mean you could drop the
range-checking code there, because guc.c would enforce it.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2016-03-17 17:31:01 Re: pgsql: GUC variable pg_trgm.similarity_threshold insead of set_limit()
Previous Message Teodor Sigaev 2016-03-17 14:43:38 pgsql: Improve support of Hunspell