Magnus Hagander <magnus@hagander.net> writes:
> On Wed, Oct 6, 2010 at 14:17, Greg Sabino Mullane <greg@turnstep.com> wrote:
>>> But that's build-time, not run-time.
>>
>> Correct, not sure of your point. Is this a problem? Build-time is
>> what we want here (determining the libpq we were built with)
> The original question was how to find this out from python, which
> means at runtime.
> And the pg_lib_version of DBD::Pg clearly doesn't tell you what
> version of libpq it's using, only what it was built against.
> As long as you have libpq 9.0, you can decode the bytea hex thingy,
> irregardless of what version of libpq your <whatever other
> code/library> was linked against.
The problem here is that you might actually be *running* with a
different version of libpq than you built against. This is actually
highly likely if you distribute an executable that dynamically links
to a shared library at runtime. And the dynamic linker will take any
version of libpq.so that has the same major number, meaning that you
cannot assume that it's not 8.4 just because you built against 9.0.
regards, tom lane