Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bq3Pv-0000D6-ET for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Sep 2016 19:24:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bq3Pv-0007YA-0z for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Sep 2016 19:24:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bq3Pp-0007UC-RD for pgsql-hackers@postgresql.org; Fri, 30 Sep 2016 19:24:13 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bq3Pm-0002wv-Ut for pgsql-hackers@postgresql.org; Fri, 30 Sep 2016 19:24:12 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 3E52920A07; Fri, 30 Sep 2016 15:24:10 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 30 Sep 2016 15:24:10 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=U2jNTX41XX+HZlZ tAxZ5JI/Ois0=; b=RXlZi+etXoMFDNBoubL7qQeikdlhOt8IFc+O6FthqSKeZIU e+Ale7nbC2/F6nZxq32msrDC6sn9puaEyupATcqo53wmz9W3bCzcSAnp27jxynqG 1kpVxBq0Qc2lqsC+tSxO7XqvnWmU29qe/yy7wHwIBTGvYi55/GSKwgrYN/54= X-Sasl-enc: A2g3iwZ29vJHGN+OELCanFd5bw5pXsqmrk5tkD1DAry4 1475263450 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id EB3E5CC083; Fri, 30 Sep 2016 15:24:09 -0400 (EDT) Subject: Re: [GENERAL] C++ port of Postgres To: Thomas Munro References: <007001d1f786$d903fa90$8b0befb0$@andl.org> <00a52208-3199-5858-8846-2530b0bb34df@archidevsys.co.nz> <27271.1471366764@sss.pgh.pa.us> <66b61d8b-fe76-d4a9-a983-93a94444a2a6@BlueTreble.com> Cc: Pg Hackers , Jim Nasby From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <6703fdf2-d0e8-54f5-333a-19220d9a716a@2ndquadrant.com> Date: Fri, 30 Sep 2016 15:24:09 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 On 9/28/16 10:48 PM, Thomas Munro wrote: > I wonder if the following bit of gin.h should be more nuanced: maybe > it's OK to convert between bool and GinTernaryValue, but it's > definitely not OK to cast between pointers types? Or maybe we should > have a function/macro to convert between the types explicitly and not > encourage people to consider them convertible. The more I look into the this, the more this looks like a web of lies. :-) The GIN consistent and triconsistent functions randomly change around between bool and GinTernaryValue, share some of the same data structures, and there is little guarantee that they each get the right kind of value all the time. This could perhaps use some deeper cleaning at some point. I've left that alone for now. >> 0009-Rename-some-typedefs-to-avoid-name-conflicts.patch > > I don't know if it's a relevant precedent or not, but I noticed that > fdwapi.h, amapi.h and tsmapi.h used the convention that function > pointer types are named XXX_function, and then the members of a struct > behaving as a kind of vtable are named XXX. Good idea, and that also overlaps with some other stuff I have wanted to tidy up in pg_dump, so I might get back to that later. >> 0011-Add-missing-fields-in-struct-initializations.patch > > I don't undestand why this is necessary, unless you're explicitly > choosing to enable a warning like missing-field-initializers for C++ > but not for C. I can't reproduce this anymore, so never mind. > As for the commitfest entry: this thread discusses two different > people's efforts to compile PostgreSQL as C++. Joy Arulraj's github > branch derives in some way from Peter Eisentraut's work, but I have > provided feedback on Peter's patches, because (1) they were posted > here in patch format and (2) there is a commitfest entry listening > Peter as the author. I think several of these patches are > committable, and many obviously are not. Heikki already set the CF > item to 'Ready for Committer' based on an inspection of a few of the > patches, but invited others to continue looking, so I did. Yeah, I have committed a few of the patches now and I'll close the CF entry now. Thanks for your research. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers