Ben Ali Rachid wrote:
> Thanks for your help. I try "extern C" for the inclusions and everything is OK. But now I have execution error
(servercrash), but it's another problem that I will try to solve.
If you're using C++ you must also:
- Ensure that no exceptions propagate outside your code
- Declare all hook functions that might be dlopen()ed as extern "C"
As Tom Lane pointed out in an earlier thread about this you'll also have
problems with Pg's longjmp based error handling skipping past
exception-driven cleanup, so you can't rely on RAII and scoped objects.
--
Craig Ringer