Re: querying the version of libpq - Mailing list pgsql-general

From Tom Lane
Subject Re: querying the version of libpq
Date
Msg-id 1013.1286312420@sss.pgh.pa.us
Whole thread Raw
In response to Re: querying the version of libpq  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-general
"Greg Sabino Mullane" <greg@turnstep.com> writes:
>> 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.

[ shrug... ]  It's not at all hard to think of scenarios where that will
give you misleading results, even granted that you're willing to fall
over when pg_config isn't present.  But regardless of that, the
technique simply isn't available to ordinary C code using the standard
dynamic linker.

            regards, tom lane

pgsql-general by date:

Previous
From: "Greg Sabino Mullane"
Date:
Subject: Re: querying the version of libpq
Next
From: Tim Uckun
Date:
Subject: Re: Trying to figure out why these queries are so slow