Re: Finding the pqlib version

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Re: Finding the pqlib version
Дата
Msg-id d456ce1842a622e48df55f61b116564c@biglumber.com
обсуждение исходный текст
Ответ на Finding the pqlib version  (Christoph Zwerschke <cito@online.de>)
Список 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@turnstep.com
PGP Key: 0x14964AC8 200602110755
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iD8DBQFD7d8FvJuQZxSWSsgRAhuMAJ4sShLpZWOUUSFVbBqfnS4UB2GuTwCgnpgl
d3HjVGFhiS5H5xNf/M2qllU=
=z7X9
-----END PGP SIGNATURE-----




В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Christoph Zwerschke
Дата:
Сообщение: Finding the pqlib version
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Finding the pqlib version