What
Extensions for PostgreSQL are traditionally written in C, but in some cases you might want to write the extension in C++ but still interface with standard PostgreSQL code. Normally, you can just include the PostgreSQL file wrapped in extern "C", but it can be useful to have some additional tools to make it easy to do some of the work.
The use of setjmp/longjmp for error reporting makes it more complicated to use the full power of C++, but in many cases this is not necessarily a problem. For example, RAII model can be used for cases where functions cannot error out.
How
Some ideas for simplifications that might be useful.
What
Extensions for PostgreSQL are traditionally written in C, but in some cases you might want to write the extension in C++ but still interface with standard PostgreSQL code. Normally, you can just include the PostgreSQL file wrapped in
extern "C", but it can be useful to have some additional tools to make it easy to do some of the work.The use of
setjmp/longjmpfor error reporting makes it more complicated to use the full power of C++, but in many cases this is not necessarily a problem. For example, RAII model can be used for cases where functions cannot error out.How
Some ideas for simplifications that might be useful.
Listtype