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 1oVZko-0004E7-7I for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Sep 2022 14:40:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oVZkm-0004az-WD for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Sep 2022 14:40:41 +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 1oVZkm-0004aq-Mt for pgsql-hackers@lists.postgresql.org; Tue, 06 Sep 2022 14:40:40 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVZkk-0006AN-AL for pgsql-hackers@lists.postgresql.org; Tue, 06 Sep 2022 14:40:40 +0000 Received: from msg.df7cb.de (unknown [IPv6:2003:5b:203b:100:7627:eaff:fe52:8e03]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4MMSjd4B8Nz3F37; Tue, 6 Sep 2022 16:40:37 +0200 (CEST) Date: Tue, 6 Sep 2022 16:40:37 +0200 From: Christoph Berg To: Tom Lane Cc: PostgreSQL Hackers Subject: Re: (doc patch) psql version compatibility Message-ID: Mail-Followup-To: Christoph Berg , Tom Lane , PostgreSQL Hackers References: <3158250.1662474083@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ouR75Mg9hoO7hYM1" Content-Disposition: inline In-Reply-To: <3158250.1662474083@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ouR75Mg9hoO7hYM1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Re: Tom Lane > Christoph Berg writes: > > I didn't understand the current wording of the NOTES section in > > psql(1) on which major versions psql is compatible with, so here's a > > patch to make that more explicit. > > This seems both very repetitive and incorrect in detail. Meh, I tried to preserve as much of the original text as reasonable, but we can strip it down further. > Some operations will work fine with older servers, some won't. > I don't think that we want to undertake documenting exactly > which commands work how far back, so my inclination is to > add a nonspecific disclaimer along the lines of > > Some commands may not work with very old servers (before 9.2). I'd like it do say "it works with 9.2" when that's what the code is implementing. How about this? psql works with servers of the same or an older major version, back to 9.2. The general functionality of running SQL commands and displaying query results should also work with servers of other major versions, but backslash commands are particularly likely to fail. If you want to use psql to connect to several servers of different major versions, it is recommended that you use the newest version of psql. (To connect to pre-9.2 servers, use psql 14 or earlier.) Christoph --ouR75Mg9hoO7hYM1 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-psql-ref.sgml-Be-more-specific-about-major-versions-.patch" From 2d83aaec5f398de041467b4fe78731401847d6a5 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Tue, 6 Sep 2022 13:21:48 +0200 Subject: [PATCH] psql-ref.sgml: Be more specific about major versions support Explicitly say which version range we are supporting. --- doc/src/sgml/ref/psql-ref.sgml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 186f8c506a..9e972f0c48 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -4946,24 +4946,17 @@ PSQL_EDITOR_LINENUMBER_ARG='--line ' - psql works best with servers of the same - or an older major version. Backslash commands are particularly likely - to fail if the server is of a newer version than psql - itself. However, backslash commands of the \d family should - work with servers of versions back to 9.2, though not necessarily with - servers newer than psql itself. The general + psql works with servers of the same + or an older major version, back to 9.2. The general functionality of running SQL commands and displaying query results - should also work with servers of a newer major version, but this cannot - be guaranteed in all cases. + should also work with servers of other major versions, but + backslash commands are particularly likely to fail. If you want to use psql to connect to several servers of different major versions, it is recommended that you use the - newest version of psql. Alternatively, you - can keep around a copy of psql from each - major version and be sure to use the version that matches the - respective server. But in practice, this additional complication should - not be necessary. + newest version of psql. (To connect to pre-9.2 servers, + use psql 14 or earlier.) -- 2.35.1 --ouR75Mg9hoO7hYM1--