Search Postgresql Archives

Re: querying the version of libpq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Magnus Hagander <magnus@xxxxxxxxxxxx> writes:
> On Wed, Oct 6, 2010 at 14:17, Greg Sabino Mullane <greg@xxxxxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux