Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlMpG-00014D-GS for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Aug 2017 22:11:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dlMpF-00039U-RB for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Aug 2017 22:11:37 +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 1dlMnZ-00007s-7x for pgsql-hackers@postgresql.org; Fri, 25 Aug 2017 22:09:53 +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 1dlMnS-0007KX-4J for pgsql-hackers@postgresql.org; Fri, 25 Aug 2017 22:09:52 +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 v7PM9aWl013304; Fri, 25 Aug 2017 18:09:36 -0400 From: Tom Lane To: Robert Haas cc: Fabien COELHO , Pavel Stehule , Corey Huinker , Daniel Verite , PostgreSQL Developers Subject: Re: Variable substitution in psql backtick expansion In-reply-to: References: <3926.1491159242@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Fri, 25 Aug 2017 16:30:58 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13302.1503698976.1@sss.pgh.pa.us> Date: Fri, 25 Aug 2017 18:09:36 -0400 Message-ID: <13303.1503698976@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > I am attempting to understand the status of this patch. It looks like > the patch that was the original subject of this thread was committed > as f833c847b8fa4782efab45c8371d3cee64292d9b on April 1st by Tom, who > was its author. Subsequently, a new patch not obviously related to the > subject line was proposed by Fabien Coelho, and that patch was > subsequently marked Ready for Committer by Pavel Stehule. Meanwhile, > objections were raised by Tom, who seems to think that we should make > \if accept an expression language before we consider this change. My question was more about how much of a use-case there is for these values if there's no expression language yet. On reflection though, you can use either expr-in-backticks or a server query to make comparisons, so there's at least some use-case for the numeric versions today. I'm still not sure that there's any use case for the string versions ("9.6.4" etc). > - Is it a good idea/practical to prevent the new variables from being > modified by the user? We haven't done that for existing informational variables, only control variables that affect psql's behavior. I think we should continue that policy for new informational variables. If we make them read-only, we risk breaking scripts that are using those names for their own purposes. If we don't make them read-only, we risk breaking scripts that are using those names for their own purposes AND expecting them to provide the built-in values. The latter risk seems strictly smaller, probably much smaller. > - I think Pavel's upthread suggestion of prefixing the client > variables with "client" to match the way the server variables are > named is a good idea. Well, the issue is the precedent of VERSION for the long-form string spelling of psql's version. But I agree that's not a very nice precedent. No strong opinion here. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers