pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PG_VERSION_NUM formatted incorrectly
4+ messages / 4 participants
[nested] [flat]

* PG_VERSION_NUM formatted incorrectly
@ 2018-01-22 18:39  Kieran McCusker <kieran.mccusker@gmail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Kieran McCusker @ 2018-01-22 18:39 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org

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.

Many Thanks

Kieran McCusker

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: PG_VERSION_NUM formatted incorrectly
@ 2018-01-22 18:47  David G. Johnston <david.g.johnston@gmail.com>
  parent: Kieran McCusker <kieran.mccusker@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: David G. Johnston @ 2018-01-22 18:47 UTC (permalink / raw)
  To: Kieran McCusker <kieran.mccusker@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org

On Mon, Jan 22, 2018 at 11:39 AM, Kieran McCusker <kieran.mccusker@gmail.com
> 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.
>
>
​Beginning with v10 the middle two digits with ALWAYS be zero - only the
first two (major release) and last two (patch version) are changed.  10.1
means v10 with the first patch release, unless 9.6 which is a major version
​in its own right and, with patch version, reads 9.6.3

David J.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: PG_VERSION_NUM formatted incorrectly
@ 2018-01-22 19:04  Alvaro Herrera <alvherre@alvh.no-ip.org>
  parent: Kieran McCusker <kieran.mccusker@gmail.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Alvaro Herrera @ 2018-01-22 19:04 UTC (permalink / raw)
  To: Kieran McCusker <kieran.mccusker@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org

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                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: PG_VERSION_NUM formatted incorrectly
@ 2018-01-22 19:14  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2018-01-22 19:14 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: Kieran McCusker <kieran.mccusker@gmail.com>; pgsql-bugs@lists.postgresql.org

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Kieran McCusker wrote:
>> But shouldn't it be
>> #define PG_VERSION_NUM 100100

> 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.

Right.  If we did it the other way, much code would think that 10.1
is a new major version, not a new minor version.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2018-01-22 19:14 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 18:39 PG_VERSION_NUM formatted incorrectly Kieran McCusker <kieran.mccusker@gmail.com>
2018-01-22 18:47 ` David G. Johnston <david.g.johnston@gmail.com>
2018-01-22 19:04 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-01-22 19:14   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox