New variable server_version_num

From: Greg Sabino Mullane <greg(at)turnstep(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: New variable server_version_num
Date: 2006-07-30 01:14:16
Message-ID: 1154222056.5336.62.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

Today on IRC David Fetter and some others were discussing version
numbers and we realized that although libpq now provides the version of
Postgres as a number, this is still a wheel that is being reinvented by
apps many times over, as it is not available any other way. Hence, a
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.

--
Greg Sabino Mullane greg(at)turnstep(dot)com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 200607292113
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

Attachment Content-Type Size
server_version_num.patch text/x-patch 3.7 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-07-30 01:44:10 Re: New variable server_version_num
Previous Message Tom Lane 2006-07-29 23:45:08 Re: Performance of the listen command

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2006-07-30 01:24:54 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Previous Message Tom Lane 2006-07-29 23:30:42 Re: Do we need multiple forms of the SQL2003 statistics

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2006-07-30 01:24:54 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Previous Message Tom Lane 2006-07-29 23:05:13 Re: [HACKERS] putting CHECK_FOR_INTERRUPTS in