From: | "Greg Sabino Mullane" <greg(at)turnstep(dot)com> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: Finding the pqlib version |
Date: | 2006-02-11 12:57:36 |
Message-ID: | d456ce1842a622e48df55f61b116564c@biglumber.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> However, there is no such thing as "PQLIB_VERSION_MAJOR".
> Anything else I could query instead?
Call "pg_config --version" and break it into pieces. To make life
easier, meld them back together into a single string with something
like this:
my $serverversion = sprintf("%d%.02d%.02d", $major_ver, $minor_ver, $patch);
Then you can do things like
if ($serverversion >= 80000) ...
and can similarly pass the above to cc via a -D and get some ifdef fun...
- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200602110755
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFD7d8FvJuQZxSWSsgRAhuMAJ4sShLpZWOUUSFVbBqfnS4UB2GuTwCgnpgl
d3HjVGFhiS5H5xNf/M2qllU=
=z7X9
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2006-02-11 13:50:15 | Re: Finding the pqlib version |
Previous Message | Christoph Zwerschke | 2006-02-11 10:59:37 | Finding the pqlib version |