Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwVSB-00064p-NB for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Feb 2019 17:14:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gwVSA-00049y-5P for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Feb 2019 17:14:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwVP1-0003Ab-BZ for pgsql-bugs@lists.postgresql.org; Wed, 20 Feb 2019 17:11:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwVOw-0003QA-Lh for pgsql-bugs@lists.postgresql.org; Wed, 20 Feb 2019 17:11:21 +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 x1KHBFdU016699; Wed, 20 Feb 2019 12:11:15 -0500 From: Tom Lane To: Joe Conway cc: kes-kes@yandex.ru, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15646: Inconsistent behavior for current_setting/set_config In-reply-to: References: <15646-0d3caee9f6266f60@postgresql.org> Comments: In-reply-to Joe Conway message dated "Wed, 20 Feb 2019 12:01:47 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16697.1550682675.1@sss.pgh.pa.us> Date: Wed, 20 Feb 2019 12:11:15 -0500 Message-ID: <16698.1550682675@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Joe Conway writes: > On 2/20/19 11:10 AM, PG Bug reporting form wrote: >> But current behavior returns empty string instead of NULL (the initial >> value) after transaction is rolled back. When I restart session, NULL is >> returned again as it is expected. > This has been discussed before and dismissed: > https://www.postgresql.org/message-id/flat/56842412.5000005%40joeconway.com > Personally I agree it is a bug, but I am not sure you will get much > support for that position. The fact that we allow undeclared user-defined GUCs at all is a bug IMO. We need to find a way to replace that behavior with something whereby the name and type of a parameter are declared up-front before you can set it. regards, tom lane