From: | Bborie Park <bkpark(at)ucdavis(dot)edu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Passing NULL to a function called with OidFunctionCall3 |
Date: | 2011-11-10 22:59:28 |
Message-ID: | 4EBC5750.3000207@ucdavis.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hey all,
I'm trying to make use of OidFunctionCall3 and am wondering how to
resolve an issue. I need to be able to pass to the function called with
OidFunctionCall3 a NULL and am having difficulty figuring out how.
{{{
/* build fcnarg */
for (i = 0; i < set_count; i++) {
if (_haspixel[i]) {
fcnarg[i] = Float8GetDatum(_pixel[i]);
POSTGIS_RT_DEBUGF(4, "arg %d is %f", i, _pixel[i]);
}
else {
fcnarg[i] = (Datum) NULL;
POSTGIS_RT_DEBUGF(4, "arg %d is NULL", i);
}
}
datum = OidFunctionCall3(fcnoid, fcnarg[0], fcnarg[1], fcnuserarg);
}}}
The above does not work (segfault). What is the correct way to pass a
NULL to the function being called?
Thanks,
Bborie
--
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkpark(at)ucdavis(dot)edu
From | Date | Subject | |
---|---|---|---|
Next Message | Raghavendra | 2011-11-10 23:00:09 | Re: "idle in transaction" entry in pg_logs |
Previous Message | Raghavendra | 2011-11-10 22:48:23 | "idle in transaction" entry in pg_logs |