35.15. Using C++ for Extensibility

It is possible to use a compiler in C++ mode to build PostgreSQL extensions by following these guidelines:

In summary, it is best to place C++ code behind a wall of extern C functions that interface to the backend, and avoid exception, memory, and call stack leakage.