Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h216B-0003eZ-Qp for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Mar 2019 22:02:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h2169-0005wO-8g for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Mar 2019 22:02:41 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1h2168-0005qy-Vf for pgsql-hackers@lists.postgresql.org; Thu, 07 Mar 2019 22:02:41 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h2164-0003KJ-9k for pgsql-hackers@postgresql.org; Thu, 07 Mar 2019 22:02:39 +0000 Received: by fetter.org (Postfix, from userid 1001) id E49BD402B8; Thu, 7 Mar 2019 23:02:34 +0100 (CET) Date: Thu, 7 Mar 2019 23:02:34 +0100 From: David Fetter To: Magnus Hagander Cc: Peter Eisentraut , pgsql-hackers Subject: Re: psql show URL with help Message-ID: <20190307220234.GI10435@fetter.org> References: <40179bd0-fa7d-4108-1991-a20ae9ad5667@2ndquadrant.com> <47e071fd-8997-f036-b383-4d80c184adeb@2ndquadrant.com> <20190303181432.GA316@fetter.org> <20190303214833.GD10435@fetter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Mar 07, 2019 at 11:44:07AM -0800, Magnus Hagander wrote: > On Mon, Mar 4, 2019 at 11:41 PM Peter Eisentraut < > peter.eisentraut@2ndquadrant.com> wrote: > > > On 2019-03-04 17:55, Magnus Hagander wrote: > > > If the first thing we do when we move from devel to some other state > > > (beta, RC, etc.) is to publish the docs under the major version > > > number, then maybe this test should be more along the lines of > > looking > > > for anything that's neither devel nor a number, extract the number, > > > and use that. > > > > > > > > > Well, alpha versions do go under the numeric URL. Whether we load the > > > docs at that time or not we can just choose -- but there is no reason > > > not to. So yeah, that sounds like it would work better. > > > > Can you put your proposal in the form of some logical pseudocode? I > > don't understand the free-form description. > > > > Hah, sorry. It's actually Davids proposal, but something like: > > if (psql_version_is_numeric) > return /docs/psql_version/ > else if (psql_version ends with 'devel') > return /docs/devel/ > else > return /docs/{psql_version but with text stripped}/ > > So that e.g. 12beta would return "12", as would 12rc or 12alpha. But > 12devel would return "devel". That's exactly what I had in mind :) Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate