Re: PG_VERSION_NUM formatted incorrectly

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Kieran McCusker <kieran(dot)mccusker(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: PG_VERSION_NUM formatted incorrectly
Date: 2018-01-22 19:04:55
Message-ID: 20180122190455.7zpoxjuesi4qk7jt@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Kieran McCusker wrote:
> Hi
> I was looking at an issue with ogr_fdw where it is trying to get
> the PG_VERSION_NUM when I noticed that in Postgresql 10.1 this is declared
> as:
> #define PG_VERSION_NUM 100001
> But shouldn't it be
> #define PG_VERSION_NUM 100100
> or am I being dense, in which case sorry to have bothered you.

You're not being dense -- the way we're using it is indeed a bit odd.
But it was a concious decision to leave it like this: the reason is that
we've been using these two digits to indicate patch level rather than
major for so long, that is seems less likely to break version parsing
tools if we continue to do that. So the patch level for release 10 is
going to use the last two digits only, with the two middle digits
remaining constant 00 forever.

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to


Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2018-01-22 19:14:41 Re: PG_VERSION_NUM formatted incorrectly
Previous Message David G. Johnston 2018-01-22 18:47:36 Re: PG_VERSION_NUM formatted incorrectly