I wrote:
>
> I'm having a bit of trouble getting a shared module written in C++ to
> load correctly with CREATE FUNCTION. The C source is:
>
> #include "postgres.h"
> #include <string.h>
> #include "fmgr.h"
>
> PG_FUNCTION_INFO_V1(echo);
...
> 1. Prevent name mangling by adding:
>
> extern "C" {
> Datum echo(PG_FUNCTION_ARGS);
> };
Please ignore my post. The include directives must be within the extern
"C" block as well. I'm not sure what needs to be done - or if anything
should be - to allow "postgres.h" and "fmgr.h" to be __cplusplus aware,
but simply placing them within the extern "C" block solved all my
problems...
Mike Mascari
mascarm@mascari.com