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

From Tom Lane
Subject Re: PQgetssl() and alternative SSL implementations
Date
Msg-id 3934.1422468320@sss.pgh.pa.us
Whole thread Raw
In response to Re: PQgetssl() and alternative SSL implementations  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: PQgetssl() and alternative SSL implementations
List pgsql-hackers
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...)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: Sequence Access Method WIP
Next
From: David G Johnston
Date:
Subject: Re: jsonb, unicode escapes and escaped backslashes