Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XJsZL-0001qL-5N for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Aug 2014 23:11:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XJsZK-0007EU-K9 for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Aug 2014 23:11:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XJsZI-0007Be-Ol for pgsql-hackers@postgresql.org; Tue, 19 Aug 2014 23:11:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XJsZF-0008IG-MH for pgsql-hackers@postgresql.org; Tue, 19 Aug 2014 23:11:54 +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 s7JNBkwq023202; Tue, 19 Aug 2014 19:11:46 -0400 From: Tom Lane To: Andres Freund cc: Heikki Linnakangas , Robert Haas , Magnus Hagander , PostgreSQL-development Subject: Re: PQgetssl() and alternative SSL implementations In-reply-to: <20140819223103.GA20476@awork2.anarazel.de> References: <53F1E989.8020609@vmware.com> <10419.1408475397@sss.pgh.pa.us> <53F3C87E.2080401@vmware.com> <20140819223103.GA20476@awork2.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 20 Aug 2014 00:31:03 +0200" Date: Tue, 19 Aug 2014 19:11:46 -0400 Message-ID: <23201.1408489906@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) 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 Andres Freund writes: > On 2014-08-20 00:58:22 +0300, Heikki Linnakangas wrote: >> I don't much like adding a separate function for every SSL implementation, >> but you've got a point that it would be nice to make it difficult to call >> PQgetSSLstruct() and just assume that the returned struct is e.g an OpenSSL >> struct, while it's actually something else. Perhaps: > A good reason to not have functions with the respective functions is > that it requires either including the relevant headers or adding forward > declarations of the libraries type. It requires no such thing. What we do for PQgetssl() is declare it as returning "void *", and we could easily do the same for other libraries. 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