Thread: strange core dump ...

strange core dump ...

From
Hans-Juergen Schoenig
Date:
I have tried to implement a small logging function. The problem is that
it does not work on some systems (it works for me on RedHat).
Does anybody know what I have done wrong?

#include <stdio.h>
#include <pgsql/postgres.h>
#include <pgsql/fmgr.h>

PG_FUNCTION_INFO_V1(myelog);
Datum myelog(PG_FUNCTION_ARGS)
{
        text *arg1 = PG_GETARG_TEXT_P(0);
        elog(NOTICE, "%s", VARDATA(arg1));
                PG_RETURN_INT16(1);
}

    Hans