Re: PQgetssl() and alternative SSL implementations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PQgetssl() and alternative SSL implementations
Date: 2015-01-28 18:05:20
Message-ID: 3934.1422468320@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnakangas(at)vmware(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G Johnston 2015-01-28 18:13:50 Re: jsonb, unicode escapes and escaped backslashes
Previous Message Petr Jelinek 2015-01-28 17:56:21 Re: Sequence Access Method WIP