X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id CF47F9DC81A for ; Sat, 11 Feb 2006 08:57:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 06266-08 for ; Sat, 11 Feb 2006 08:57:41 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from biglumber.com (biglumber.com [207.228.252.42]) by postgresql.org (Postfix) with SMTP id 661DE9DC811 for ; Sat, 11 Feb 2006 08:57:33 -0400 (AST) Received: (qmail 7235 invoked from network); 11 Feb 2006 12:57:36 -0000 Received: from unknown (HELO localhost) (207.228.252.42) by 0 with SMTP; 11 Feb 2006 12:57:36 -0000 From: "Greg Sabino Mullane" To: pgsql-interfaces@postgresql.org Subject: Re: Finding the pqlib version X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: <43EDC399.6060203@online.de> Date: Sat, 11 Feb 2006 12:57:36 -0000 X-Mailer: JoyMail 1.48 Message-ID: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.102 required=5 tests=[AWL=0.102] X-Spam-Score: 0.102 X-Spam-Level: X-Archive-Number: 200602/25 X-Sequence-Number: 5989 -----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-----