Re: [HACKERS] [GENERAL] queriing the version of libpq

2010-12-22 Thread Magnus Hagander
On Mon, Dec 20, 2010 at 16:48, Magnus Hagander wrote: > On Thu, Dec 16, 2010 at 17:13, Tom Lane wrote: >> Magnus Hagander writes: >>> On Thu, Dec 16, 2010 at 17:07, Tom Lane wrote: because if you're trying to link against an older libpq, the link will fail before you ever get to execu

Re: [HACKERS] [GENERAL] queriing the version of libpq

2010-12-20 Thread Magnus Hagander
On Thu, Dec 16, 2010 at 17:13, Tom Lane wrote: > Magnus Hagander writes: >> On Thu, Dec 16, 2010 at 17:07, Tom Lane wrote: >>> because if you're trying to link against an older libpq, the link will >>> fail before you ever get to execute.  So let's have a less implausible >>> use-case please. >

Re: [HACKERS] [GENERAL] queriing the version of libpq

2010-12-16 Thread Andrew Chernow
And it *could* be used in exactly the case you're outlining as long as you load the function dynamically. Detecting the presence of a function does not require a version number. If the symbol is in the library, use it. The only reason the version number would come into play is if you were

Re: [HACKERS] [GENERAL] queriing the version of libpq

2010-12-16 Thread Tom Lane
Magnus Hagander writes: > On Thu, Dec 16, 2010 at 17:07, Tom Lane wrote: >> because if you're trying to link against an older libpq, the link will >> fail before you ever get to execute.  So let's have a less implausible >> use-case please. > Look back at the very start of the thread. OK, but l

Re: [HACKERS] [GENERAL] queriing the version of libpq

2010-12-16 Thread Magnus Hagander
On Thu, Dec 16, 2010 at 17:07, Tom Lane wrote: > Magnus Hagander writes: >> But it does outline that fact that it wouldn't suck to have a >function  in >> libpq returning the version so that application can >check this at  runtime >> - clearly it would also be useful when >being linked "through

Re: [HACKERS] [GENERAL] queriing the version of libpq

2010-12-16 Thread Tom Lane
Magnus Hagander writes: > But it does outline that fact that it wouldn't suck to have a >function  in > libpq returning the version so that application can >check this at  runtime - > clearly it would also be useful when >being linked "through" something like > psycopg2. > Stuck in a local git

Re: [HACKERS] [GENERAL] queriing the version of libpq

2010-12-16 Thread Dmitriy Igrishin
Magnus, thats great ! And name PQlibVersion is correct ! Thanks. 2010/12/16 Magnus Hagander > On Tue, Dec 14, 2010 at 17:56, Massa, Harald Armin wrote: > >>> My question: Which way is available to query the linked libpq version? > > > >> But it does outline that fact that it wouldn't suck to ha

Re: [HACKERS] [GENERAL] queriing the version of libpq

2010-12-16 Thread Magnus Hagander
On Tue, Dec 14, 2010 at 17:56, Massa, Harald Armin wrote: >>> My question: Which way is available to query the linked libpq version? > >> But it does outline that fact that it wouldn't suck to have a >function  in >> libpq returning the version so that application can >check this at  runtime >>