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 18:02:10
Message-ID: 4259.1458237730@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:
>> It should go through SetConfigOption(); compare for example
>> tsa_set_curcfg_byname(). Which would also mean you could drop the

> Seems, also show_limit() should use GetConfigOption()?

Nah, that's overkill. The current contents of similarity_threshold are
always the current state of the GUC variable. The problem with just
assigning to the variable is that then guc.c doesn't know what you did
and might overwrite the value later.

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-03-17 19:50:51 pgsql: Fix assorted breakage in to_char()'s OF format option.
Previous Message Teodor Sigaev 2016-03-17 17:59:28 Re: pgsql: GUC variable pg_trgm.similarity_threshold insead of set_limit()