"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