Re: PQinitSSL broken in some use casesf - Mailing list pgsql-hackers

From Robert Haas
Subject Re: PQinitSSL broken in some use casesf
Date
Msg-id 603c8f070902100806mbd4023av4561284e36ef655f@mail.gmail.com
Whole thread Raw
In response to Re: PQinitSSL broken in some use casesf  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PQinitSSL broken in some use casesf
List pgsql-hackers
On Tue, Feb 10, 2009 at 10:54 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>>> We could do that, I guess. However, if an application passes this in to
>>> an old version of libpq, there is no way to know that it didn't know
>>> about it.
>
>> Well, you could create PQinitSSLExtended, but, as you say, the use
>> case is pretty narrow...
>
>> It would help if there were a PQgetLibraryVersion() function.
>
> Help how?  There is nothing an app can do to work around the problem
> AFAICS.  Or if there were, we should just document it and not change
> the code --- the use case for this is evidently too narrow to justify
> complicating libpq's API even more.

It would let you assert that you were running against a version of
libpq that has the functionality that you are attempting to use, thus
eliminating the risk of silent failure.

...Robert


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: PQinitSSL broken in some use casesf
Next
From: Tom Lane
Date:
Subject: Re: PQinitSSL broken in some use casesf