pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <greg@turnstep.com>
To: pgsql-interfaces@postgresql.org
Subject: Re: Finding the pqlib version
Date: Sat, 11 Feb 2006 12:57:36 -0000
Message-ID: <d456ce1842a622e48df55f61b116564c@biglumber.com> (raw)
In-Reply-To: <43EDC399.6060203@online.de>


-----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-----





view thread (33+ messages)  latest in thread

Message-ID: <d456ce1842a622e48df55f61b116564c@biglumber.com>
Permalink:  ../d456ce1842a622e48df55f61b116564c@biglumber.com/
Also on:    postgresql.org/message-id/d456ce1842a622e48df55f61b116564c@biglumber.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: greg@turnstep.com
  Subject: Re: Finding the pqlib version
  In-Reply-To: <d456ce1842a622e48df55f61b116564c@biglumber.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox