|
Home > Archive > PostgreSQL Discussion > May 2005 > Re: C++-Language Function/Process List
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: C++-Language Function/Process List
|
|
| Douglas McNaught 2005-05-23, 11:23 am |
| Kelly Burkhart < kelly@tradebotsystem
s.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.
-Doug
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
| |
| Tom Lane 2005-05-23, 11:23 am |
| Douglas McNaught <doug@mcnaught.org> writes:
> Kelly Burkhart < kelly@tradebotsystem
s.com> writes:
[color=darkred]
> 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
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
|
|
|
|
|