Re: New variable server_version_num - Mailing list pgsql-patches

From Tom Lane
Subject Re: New variable server_version_num
Date
Msg-id 21507.1154223850@sss.pgh.pa.us
Whole thread Raw
In response to New variable server_version_num  (Greg Sabino Mullane <greg@turnstep.com>)
Responses Re: New variable server_version_num  (David Fetter <david@fetter.org>)
List pgsql-patches
Greg Sabino Mullane <greg@turnstep.com> writes:
> small patch to provide a new variable "server_version_num", which is
> almost the same as "server_version" but uses the handy PG_VERSION_NUM
> which allows apps to do things like if ($version >= 80200) without
> having to parse apart the value of server_version themselves.

This seems pretty useless, as it will be many years before any app that
actually tries to deal with back server versions could rely on the
variable existing.

The correct solution is for client-side libraries to provide the
feature.  libpq already does (PQserverVersion()) ... and it works
for any server version from about 6.4 forward ...

            regards, tom lane

pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: [HACKERS] 8.2 features?
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] pg_regress breaks on msys