Tom Lane wrote:
Well, there's nothing wrong with that C code, so the problem is
someplace else.
Did you remember to declare the function STRICT? If not, and if
there are any nulls in your test table, a crash would be expected;
there's nothing in this function that's guarding against a null
pointer dereference.
I did declare the function STRICT, yes.
I'm wondering if maybe there is a dependency somewhere I'm missing. I
link with postgres.lib to create the dll; I basically made an educated
guess as to what to link with to get rid of linker errors, since the
documentation didn't really say I needed to link with anything, but I
suppose it's possible that there is another .lib somewhere that I should
link with instead. Is there anyone who has experience writing custom C
functions for Postgres that could weigh in here?
Thanks,
Dan