Skip site navigation (1) Skip section navigation (2)

Re: SPI-header-files safe for C++-compiler

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Jacob Rief <jacob(dot)rief(at)gmx(dot)at>, pgsql-patches(at)postgresql(dot)org
Subject: Re: SPI-header-files safe for C++-compiler
Date: 2007-06-28 06:07:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Neil Conway <neilc(at)samurai(dot)com> writes:
> On Thu, 2007-28-06 at 01:15 -0400, Tom Lane wrote:
>> The patch as given merely renames some random identifiers that happen to
>> be keywords in some non-C language ...

> The fact is, any user-written extensions that depend on types defined in
> parsenodes.h and primnodes.h are going to get broken all the time
> *anyway*, so I don't see this as a major disadvantage.

Sure, but we don't break them just on a whim.  The bottom line here is
whether we are going to make a real commitment to making C++ usable as
a backend extension language --- and for the reasons I mentioned, that
would entail a lot more than renaming a few identifiers.  It was already
pointed out upthread that wrapping the inclusions in extern "C" {...}
would fix the identifier part of the problem from the user side, so I do
not see the point of fixing it from our side unless we are prepared to
buy into a lot of other changes.  A C++ writer who is unwilling to add
the extern{} bit around inclusions of C headers seems unlikely to "work
with us" as regards to error-throwing conventions, for instance.

			regards, tom lane

In response to


pgsql-patches by date

Next:From: Neil ConwayDate: 2007-06-28 06:26:30
Subject: Re: SPI-header-files safe for C++-compiler
Previous:From: Neil ConwayDate: 2007-06-28 05:49:40
Subject: Re: SPI-header-files safe for C++-compiler

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group