Re: PQgetssl() and alternative SSL implementations - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: PQgetssl() and alternative SSL implementations
Date
Msg-id 54D10C44.7040607@vmware.com
Whole thread Raw
In response to Re: PQgetssl() and alternative SSL implementations  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 01/28/2015 08:05 PM, Tom Lane wrote:
> Heikki Linnakangas <hlinnakangas@vmware.com> writes:
>> Right, that was the idea. I wanted it to include the word "OpenSSL", to
>> make it clear in the callers that it's specific to OpenSSL. And SSL,
>> because that's the name of the struct. I agree it looks silly, though.
>> One idea is to have two separate arguments: the implementation name, and
>> the struct name. PQgetSSLstruct(&ssl, "OpenSSL", "SSL") would look less
>> silly.
>
> That's probably overkill.  Why not establish a convention that the "main"
> API struct for the library doesn't have to be named?  So it's just
> PQgetSSLstruct(&ssl, "OpenSSL"), and you only need strange naming if
> you're dealing with a library that actually has more than one API object
> that needs to be fetched this way.  (That set is likely empty...)

Works for me. Committed that way.

- Heikki




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Release note bloat is getting out of hand
Next
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0