Re: psql show URL with help

From: David Fetter <david(at)fetter(dot)org>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql show URL with help
Date: 2019-03-08 15:11:25
Message-ID: 20190308151125.GL10435@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 08, 2019 at 01:45:03PM +0100, Peter Eisentraut wrote:
> On 2019-03-07 23:02, David Fetter wrote:
> >> 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 :)
>
> The outcome of that is exactly what my patch does, but the inputs are
> different. We have PG_MAJORVERSION, which is always a single integer,
> and PG_VERSION, which could be 10.9.8 or 11beta5 or 12devel. The patch does
>
> if (PG_VERSION ends with 'devel')
> return /docs/devel/
> else
> return /docs/$PG_MAJORVERSION/
>
> There is no third case. Your third case of not-numeric-and-not-devel is
> correctly covered by the else branch.

Thanks for helping me understand.

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2019-03-08 15:19:03 Re: Online verification of checksums
Previous Message Alvaro Herrera 2019-03-08 15:03:18 Re: Update does not move row across foreign partitions in v11