Douglas McNaught <doug@mcnaught.org> writes:
> Kelly Burkhart <kelly@tradebotsystems.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