Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YGWzc-0001hN-PQ for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jan 2015 18:05:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YGWzc-00065T-9w for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jan 2015 18:05:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YGWza-00065M-NA for pgsql-hackers@postgresql.org; Wed, 28 Jan 2015 18:05:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YGWzW-0007ri-7A for pgsql-hackers@postgresql.org; Wed, 28 Jan 2015 18:05:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t0SI5KM5003935; Wed, 28 Jan 2015 13:05:20 -0500 From: Tom Lane To: Heikki Linnakangas cc: Stephen Frost , Robert Haas , Magnus Hagander , PostgreSQL-development Subject: Re: PQgetssl() and alternative SSL implementations In-reply-to: <54C919FD.1000809@vmware.com> References: <53F1E989.8020609@vmware.com> <10419.1408475397@sss.pgh.pa.us> <53F3C87E.2080401@vmware.com> <54C8FCB0.4050304@vmware.com> <20150128165847.GY3854@tamriel.snowman.net> <54C919FD.1000809@vmware.com> Comments: In-reply-to Heikki Linnakangas message dated "Wed, 28 Jan 2015 19:18:53 +0200" Date: Wed, 28 Jan 2015 13:05:20 -0500 Message-ID: <3934.1422468320@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Heikki Linnakangas 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers