Re: C++-Language Function/Process List

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Douglas McNaught <doug(at)mcnaught(dot)org>
Cc: Kelly Burkhart <kelly(at)tradebotsystems(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: C++-Language Function/Process List
Date: 2005-05-23 15:48:08
Message-ID: 8288.1116863288@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Douglas McNaught <doug(at)mcnaught(dot)org> writes:
> Kelly Burkhart <kelly(at)tradebotsystems(dot)com> writes:
>> I used C++ and noticed that some Postgres headers contain C++ keywords.
>> Is there any interest among PG developers in making the C-language
>> interface C++ clean? Or, is there hostility to this idea?

> Postgres is written in C. AIUI it's somewhat dangerous to link C++
> functions into the backend, since PG doesn't know how to cope with
> thrown exceptions and the like.

However, as long as you avoid constructs like throw that require C++
library support, you can in principle use C++ as "a better C". (Now
that we have PG_TRY it might even be interesting to see if that could
be integrated with C++ throw ...)

Avoiding C++ keywords has been discussed before, and my recollection is
that we decided the changes would be more invasive than the value would
justify. But that was a long time ago and the situation may have
changed. I'd suggest spending enough time to work up a rough list of
what would need to be changed, and putting it up for discussion in the
-hackers list.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-05-23 15:52:17 Re: table synonyms
Previous Message Martijn van Oosterhout 2005-05-23 15:47:14 Re: Problem merging two rows into same primary key