Re: custom C function problem - Mailing list pgsql-general

From Dan \"Heron\" Myers
Subject Re: custom C function problem
Date
Msg-id 481D0162.1010702@xnapid.com
Whole thread Raw
In response to Re: custom C function problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: custom C function problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general

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

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Problems in queries
Next
From: Craig Ringer
Date:
Subject: Re: large query by offset and limt