Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dpHsK-0004Er-8R for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Sep 2017 17:43:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dpHsJ-00040k-J7 for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Sep 2017 17:42:59 +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 1dpHqj-0007bK-Ji for pgsql-hackers@postgresql.org; Tue, 05 Sep 2017 17:41:21 +0000 Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dpHqc-0008LH-93 for pgsql-hackers@postgresql.org; Tue, 05 Sep 2017 17:41:21 +0000 Received: by mail-oi0-x22f.google.com with SMTP id x184so28978170oia.0 for ; Tue, 05 Sep 2017 10:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=c2pLythWJjLsqeJOd4BDIhnsxZZuFwqpH5y0ooAKla0=; b=l7WVqiHEAXprK2BUVw4muAF5s8E70hqT32tjFlKq8WaXZwH1cQdQ96nBi6PBgfRmrL 0LvJ8Fv/Y7Wu1qkfDK6Sw/8NEaKNT/VWuz2Zja4tMn2p36g3o8Fk5MMoyIRLSxhLTm9L NCw6djwfc46vjZ5xHprTovXxnoE+dmwJH12Bk5XxMAR1z378EFZ1E0QUeeg72DsWD/JO sBfNQP1/J4XQ6v7yJSzwbAreV63w2hMgLLq4S0EO8RKD9WxwhvbYqjiAhLfW3fXDPB4D CaOMIVdZLk1+0Z96vrn037WQNKfAXGSTyJ945FsKHajUhJFJv+RWoNJk2PsWDZOv+e0a lfeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=c2pLythWJjLsqeJOd4BDIhnsxZZuFwqpH5y0ooAKla0=; b=TqLJ+d4jFDKHUjq2DL9EVlSEgsB3vMSPgJvnoeolbv7uxkaviHO9qd6aitwtiC64fj 02E+ELbvV/WERaJDCpf7dU+elf4nNPQ3ks/T5K0+iAerUAzW4XbR0DUoJGzSq8tS9ZqO XWYMuTVaOIXklPZwiigu6G9tsG2SvMwDa/YkN3ZQE5OFeDKxwkZwL2UzGxDMxPcm7UG+ O4D3Hp+ALjc4YFipAbH+Ckv4BUkxzY3RbO3cqaZT7IGXP7hnaxwmIBeTGuRsMclLvmZc LN5pKWDI32C+A+/fHfAtQtP1hoRuK0nEH2DIGzoaRV5glJwma3+YbAO2VWatyGowOcn6 Z8ZA== X-Gm-Message-State: AHPjjUg20o9GoxZZB/0a6aW+jrezNXj4Fq29aJ5BtezGKFqvEM1jLRxN 63jYGc52egpGxNrkP5Lc/WOmZQIXcbNk X-Google-Smtp-Source: ADKCNb6xZ8ZCYY2L4uZvCoCAUxWjSClEZLFzj+hmJNA5rsUk6Trs+ntWB2nzJLHEGYSEojlrSm2tMtGeh1kEiC8FxJ4= X-Received: by 10.202.83.133 with SMTP id h127mr4030307oib.191.1504633272499; Tue, 05 Sep 2017 10:41:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.151.204 with HTTP; Tue, 5 Sep 2017 10:41:11 -0700 (PDT) In-Reply-To: <4782.1504630716@sss.pgh.pa.us> References: <2774.1504628172@sss.pgh.pa.us> <4782.1504630716@sss.pgh.pa.us> From: Simon Riggs Date: Tue, 5 Sep 2017 10:41:11 -0700 Message-ID: Subject: Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version. To: Tom Lane Cc: Robert Haas , "pgsql-hackers@postgresql.org" Content-Type: text/plain; charset="UTF-8" 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 On 5 September 2017 at 09:58, Tom Lane wrote: > Robert Haas writes: >> On Tue, Sep 5, 2017 at 12:16 PM, Tom Lane wrote: >>> Hm. I think it would be a fine idea to push this change into v10, >>> so that all psql versions that have \if would have these variables. >>> However, I'm less enthused about adding them to the 9.x branches. >>> Given the lack of \if, I'm not seeing a use-case that would justify >>> taking any compatibility risk for. >>> >>> Opinions anyone? > >> As I see it, the risks of back-patching are: > >> 1. Different minor versions will have different behavior, and that >> tends to create more problems than it solves. > > Yeah. Whatever use-case you think might exist for these variables in, > say, 9.6 is greatly weakened by the fact that releases through 9.6.5 > don't have them. Makes sense > However, since v10 is still in beta I don't think that argument > applies to it. OK Does raise the further question of how psql behaves when we connect to a pre-10 server, so we have SERVER_VERSION_NUM but yet it is not set. How does this \if SERVER_VERSION_NUM < x behave if unset? Presumably it fails, even though the version *is* less than x Do we need some macro or suggested special handling? -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers