Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agcFo-0001Ov-Hn for pgsql-committers@arkaria.postgresql.org; Thu, 17 Mar 2016 18:02:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1agcFn-0008IH-RL for pgsql-committers@arkaria.postgresql.org; Thu, 17 Mar 2016 18:02:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1agcFb-000847-7a for pgsql-committers@postgresql.org; Thu, 17 Mar 2016 18:02:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1agcFP-000619-WA for pgsql-committers@postgresql.org; Thu, 17 Mar 2016 18:02:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u2HI2AeS004260; Thu, 17 Mar 2016 14:02:10 -0400 From: Tom Lane To: Teodor Sigaev cc: pgsql-committers@postgresql.org Subject: Re: pgsql: GUC variable pg_trgm.similarity_threshold insead of set_limit() In-reply-to: <56EAF080.8040905@sigaev.ru> References: <1964.1458234712@sss.pgh.pa.us> <56EAF080.8040905@sigaev.ru> Comments: In-reply-to Teodor Sigaev message dated "Thu, 17 Mar 2016 20:59:28 +0300" Date: Thu, 17 Mar 2016 14:02:10 -0400 Message-ID: <4259.1458237730@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Teodor Sigaev 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 -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers