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

From Tom Lane
Subject Re: PQinitSSL broken in some use casesf
Date
Msg-id 7782.1234282482@sss.pgh.pa.us
Whole thread Raw
In response to Re: PQinitSSL broken in some use casesf  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: PQinitSSL broken in some use casesf  (Robert Haas <robertmhaas@gmail.com>)
Re: PQinitSSL broken in some use casesf  (Andrew Chernow <ac@esilo.com>)
Re: PQinitSSL broken in some use casesf  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
>>> 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.

If that's all you want, then PQinitSSLExtended is a perfectly good
answer.  Your app will fail to link if you try to use a library
version that hasn't got it.

I think documenting the workaround is a sufficient answer though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: PQinitSSL broken in some use casesf
Next
From: Bruce Momjian
Date:
Subject: Re: PQinitSSL broken in some use casesf