Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dpd01-0005yH-9W for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Sep 2017 16:16:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dpd00-0001Zq-SA for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Sep 2017 16:16:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dpczz-0001Yv-QJ for pgsql-hackers@postgresql.org; Wed, 06 Sep 2017 16:16:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dpczx-0008Cw-Bi for pgsql-hackers@postgresql.org; Wed, 06 Sep 2017 16:16:18 +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 v86GGCgq002598; Wed, 6 Sep 2017 12:16:12 -0400 From: Tom Lane To: Simon Riggs cc: Fabien COELHO , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version. In-reply-to: References: <2774.1504628172@sss.pgh.pa.us> <4782.1504630716@sss.pgh.pa.us> <18953.1504705115@sss.pgh.pa.us> Comments: In-reply-to Simon Riggs message dated "Wed, 06 Sep 2017 08:41:53 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2596.1504714572.1@sss.pgh.pa.us> Date: Wed, 06 Sep 2017 12:16:12 -0400 Message-ID: <2597.1504714572@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 Simon Riggs writes: > * Clarification that this will work for current AND past server versions The short answer is it works. I do not think we need a longer answer. (The existing comment in libpq says that the "select version()" method works in any server version that supports protocol v2, which means that we will derive a correct server version ID for any server that modern libpq is capable of connecting to at all. I've not gone back to re-verify what I wrote in 2003, but I see no reason to doubt it. We'd have been considerably more fussed about whether PQserverVersion worked correctly for ancient server versions back then than we need be today.) > * Clarification to avoid confusion between VERSION and SERVER_VERSION In what way are these variables not adequately specified already? 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