Re: New variable server_version_num

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org, Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: New variable server_version_num
Date: 2006-07-30 01:44:10
Message-ID: 21507.1154223850@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

Greg Sabino Mullane <greg(at)turnstep(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2006-07-30 02:56:21 Re: Performance of the listen command
Previous Message Greg Sabino Mullane 2006-07-30 01:14:16 New variable server_version_num

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-07-30 01:45:25 Re: [HACKERS] pg_regress breaks on msys
Previous Message Joe Conway 2006-07-30 01:37:35 Re: [HACKERS] 8.2 features?

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-07-30 01:45:25 Re: [HACKERS] pg_regress breaks on msys
Previous Message Joe Conway 2006-07-30 01:37:35 Re: [HACKERS] 8.2 features?