Re: querying the version of libpq

Magnus Hagander <magnus@hagander.net>

From: Magnus Hagander <magnus@hagander.net>
To: Greg Sabino Mullane <greg@turnstep.com>
Cc: pgsql-general@postgresql.org
Date: 2010-10-05T20:44:48Z
Lists: pgsql-hackers
On Tue, Oct 5, 2010 at 22:39, Greg Sabino Mullane <greg@turnstep.com> wrote:
>
>
>> The real problem is that neither of these can be trusted to tell you the
>> *library* version.  PQserverVersion() is something else altogether,
>> and I wouldn't want to assume that pg_config exactly matches the library
>> you're linked to --- if it's even present at all.
>
> Er...yes it will match exact...because we[1] get the location of the
> library files from pg_config as well. :) Handy little utility that.

How do you get pg_config to tell you which of the multiple versions of
libpq that may be installed on the machine you are actually linking
against?

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/