Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVRMR-0008WK-TX for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Sep 2022 05:42:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oVRMQ-00055F-D1 for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Sep 2022 05:42:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVRMQ-000550-3g for pgsql-hackers@lists.postgresql.org; Tue, 06 Sep 2022 05:42:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVRMO-0001Vg-0G for pgsql-hackers@lists.postgresql.org; Tue, 06 Sep 2022 05:42:57 +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 2865grSG3049614; Tue, 6 Sep 2022 01:42:54 -0400 From: Tom Lane To: Pavel Stehule cc: pgsql-hackers@lists.postgresql.org Subject: Re: Modernizing our GUC infrastructure In-reply-to: References: <2982579.1662416866@sss.pgh.pa.us> Comments: In-reply-to Pavel Stehule message dated "Tue, 06 Sep 2022 06:35:56 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3049612.1662442973.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 06 Sep 2022 01:42:53 -0400 Message-ID: <3049613.1662442973@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pavel Stehule writes: > Ășt 6. 9. 2022 v 6:32 odesĂ­latel Pavel Stehule > napsal: >> 1. Session variables can be persistent - so the usage of session variables >> can be checked by static analyze like plpgsql_check > more precious - metadata of session variables are persistent Right ... so the question is, is that a feature or a bug? I think there's a good analogy here to temporary tables. The SQL spec says that temp-table schemas are persistent and database-wide, but what we actually have is that they are session-local. People occasionally propose that we implement the SQL semantics for that, but in the last twenty-plus years no one has bothered to write a committable patch to support it ... much less remove the existing behavior in favor of that, which I'm pretty sure no one would think is a good idea. So, is it actually a good idea to have persistent metadata for session variables? I'd say that the issue is at best debatable, and at worst proven wrong by a couple of decades of experience. In what way are session variables less mutable than temp tables? Still, this discussion would be better placed on the other thread. regards, tom lane