Re: [GENERAL] C++ port of Postgres

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Subject: Re: [GENERAL] C++ port of Postgres
Date: 2017-03-01 04:42:45
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-general pgsql-hackers

On 1/26/17 22:46, Andres Freund wrote:
> On 2016-09-30 15:24:09 -0400, Peter Eisentraut wrote:
>> Yeah, I have committed a few of the patches now and I'll close the CF
>> entry now. Thanks for your research.
> Are you planning to push more of these at some point?

Sure, let's take a look.

Here are rebased patches. It now contains a patch that removes all C++
keywords, instead of just defining them away. With that, this now
builds with g++-6 (formerly only g++-5), and with that, the
static_assert support works as well.

Interesting patches to review would be:


The rest are mostly for amusement.

Getting rid of the C++ keywords would open up the possibility of using
-Wc++-compat, which you have expressed interest in, I think. I think it
also increases clarity in some cases in its own right, so it's worth
taking a look. (Then again, there are some rush jobs in there, as well.)

(This semi-bug was found while preparing these patches:;a=commit;h=eb75f4fced77e108393f18425ec3f7aba2e70a9d)

Peter Eisentraut
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v2-0001-Fix-mixup-of-bool-and-ternary-value.patch text/x-patch 1.4 KB
v2-0002-Fix-LDFLAGS-test-for-C.patch text/x-patch 2.3 KB
v2-0003-Add-test-for-Wmissing-prototypes.patch text/x-patch 2.7 KB
v2-0004-Add-necessary-type-cast.patch text/x-patch 767 bytes
v2-0005-Rename-some-typedefs-to-avoid-name-conflicts.patch text/x-patch 9.6 KB
v2-0006-Reorder-some-things.patch text/x-patch 4.0 KB
v2-0007-Eliminate-C-keywords.patch text/x-patch 358.5 KB
v2-0008-Set-up-for-static-asserts-in-C.patch text/x-patch 1.4 KB
v2-0009-Fix-function-prototypes-for-C.patch text/x-patch 6.2 KB
v2-0010-Fix-fmgr_oldstyle-for-C.patch text/x-patch 7.3 KB
v2-0011-Don-t-define-bool-in-C.patch text/x-patch 744 bytes
v2-0012-Change-TimeoutId-from-enum-to-integer.patch text/x-patch 1.6 KB
v2-0013-Add-explicit-cast-for-casting-away-volatile.patch text/x-patch 873 bytes
v2-0014-Add-more-extern-key-words.patch text/x-patch 2.5 KB
v2-0015-Workaround-for-using-typdef-ed-ints-in-loops.patch text/x-patch 6.4 KB
v2-0016-Disable-conflicting-function.patch text/x-patch 864 bytes
v2-0017-Add-C-linkage-to-replacement-declaration-of-fdata.patch text/x-patch 762 bytes
v2-0018-Make-inet_net_-to-C-linkage.patch text/x-patch 1.3 KB
v2-0019-Add-C-linkage-to-functions-exported-by-plugins.patch text/x-patch 18.2 KB
v2-0020-Add-C-linkage-to-client-libraries-in-non-systemat.patch text/x-patch 5.1 KB
v2-0021-Hack-Disable-volatile-that-causes-mysterious-comp.patch text/x-patch 1.5 KB
v2-0022-Add-additional-options-to-silence-warnings-for-C.patch text/x-patch 4.4 KB
v2-0023-Fix-issue-with-enums-and-va_arg.patch text/x-patch 3.4 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-03-01 04:49:09 Re: rename pg_log directory?
Previous Message Andres Freund 2017-03-01 04:29:36 Re: PATCH: two slab-like memory allocators

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2017-03-01 05:47:00 Re: Understanding pg_last_xlog_receive_location
Previous Message Dan Hitt 2017-03-01 03:32:16 emitting all plans considered for a query (as opposed to just the winning one)