Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sURbR-00351m-0D for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jul 2024 13:55:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sURbP-00GlxC-5M for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jul 2024 13:55:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sURbO-00Glwn-Sw for pgsql-bugs@lists.postgresql.org; Thu, 18 Jul 2024 13:55:23 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sURbM-000CxT-IQ for pgsql-bugs@lists.postgresql.org; Thu, 18 Jul 2024 13:55:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 46IDtIOH3702825; Thu, 18 Jul 2024 09:55:18 -0400 From: Tom Lane To: haydenwillsim@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18544: Setting local config_parameter to DEFAULT behaves unexpectedly when using period in config name In-reply-to: <18544-60e74dd413b155f1@postgresql.org> References: <18544-60e74dd413b155f1@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 18 Jul 2024 09:34:25 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3702823.1721310918.1@sss.pgh.pa.us> Date: Thu, 18 Jul 2024 09:55:18 -0400 Message-ID: <3702824.1721310918@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > When a connection is initialised, calling `SELECT > current_setting('hasura.user', 't');`, as expected will return a NULL. > However if you call `SET "hasura.user" TO DEFAULT;`, this will actually > intitialise the value to an empty string. That's a side effect of SET causing such a custom GUC to spring into existence --- with an empty-string default, because there is no better value. > This presents a huge problem, If you don't like it, don't use custom GUCs. They're not officially supported --- the only reason this is allowed at all is to allow setting of an extension's GUCs before the extension is loaded. See https://www.postgresql.org/docs/current/runtime-config-custom.html regards, tom lane