Re: custom C function problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dan \"Heron\" Myers" <heron(at)xnapid(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: custom C function problem
Date: 2008-05-03 17:50:35
Message-ID: 10185.1209837035@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Dan \"Heron\" Myers" <heron(at)xnapid(dot)com> writes:
> I'm creating some custom C functions to load dynamically from a dll
> (this is Postgres 8.3.1 on Windows XP SP2). I have two that work fine,
> but any time I try to write one that uses a text*, postgres crashes.

What cases have you gotten to work correctly?

My guess is that you're either messed up about V0 vs V1 calling
convention (ie you forgot PG_FUNCTION_INFO_V1, or added it when you
shouldn't have), or you've got some kind of problem with not detoasting
toasted input values. There's not enough info here to venture more.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dan "Heron" Myers 2008-05-03 17:58:41 Re: custom C function problem
Previous Message Dan "Heron" Myers 2008-05-03 17:27:36 custom C function problem