| From: | David Fetter <david(at)fetter(dot)org> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-hackers(at)postgresql(dot)org, Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: New variable server_version_num |
| Date: | 2006-07-30 06:25:44 |
| Message-ID: | 20060730062544.GQ2654@fetter.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-hackers pgsql-patches |
On Sat, Jul 29, 2006 at 09:44:10PM -0400, Tom Lane wrote:
> 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.
In my case, its non-existence is a guarantee that the server version
number isn't high enough :)
> The correct solution is for client-side libraries to provide the
> feature.
Not if the app is written in SQL, as the bootstrap, regression test,
etc. code for modules frequently is.
> libpq already does (PQserverVersion()) ... and it works for any
> server version from about 6.4 forward ...
See above for why it's good also to have it surfaced to SQL :)
Cheers,
D
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter
Remember to vote!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ron Johnson | 2006-07-30 07:46:16 | Joining dates/times (was Re: Splitting Timestamps) |
| Previous Message | Andreas Kretschmer | 2006-07-30 05:34:25 | Re: create function syntax error |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stefan Kaltenbrunner | 2006-07-30 08:03:25 | Re: Going for "all green" buildfarm results |
| Previous Message | Alvaro Herrera | 2006-07-30 06:20:05 | Re: Going for "all green" buildfarm results |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-07-30 15:27:33 | Re: New variable server_version_num |
| Previous Message | Bruce Momjian | 2006-07-30 02:16:27 | Re: PATCH to allow concurrent VACUUMs to not lock each |