From: | Luis Vargas <Luis(dot)Vargas(at)cl(dot)cam(dot)ac(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | fmgr_info_cxt_security() modifies variable? |
Date: | 2007-10-11 00:47:41 |
Message-ID: | Prayer.1.0.18.0710110147410.11366@hermes-2.csi.cam.ac.uk |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi, I'm calling an arbitrary user-defined function from the backend.
Although I can do it via FunctionCallInvoke, I have a weird problem when
calling fmgr_info. The call results in a argument variable (eventType)
being cleared. A gdb hardware watch says that the variable is modified by
this line (185) in fmgr.c: finfo->fn_extra = NULL; Any ideas of what is
happening?
For simplicity, in the following snippet I have hardcoded foid to some
(PGPSQL) function id and removed the rest of the call-related statements.
static void execEventTypeFunc(char *eventType, Oid funcId)
{
FmgrInfo *finfo;
FunctionCallInfoData fcinfo;
Datum result;
Oid foid = 17283;
finfo = (FmgrInfo *) palloc0(sizeof(FmgrInfo));
fmgr_info(foid, finfo);
...
}
Thanks,
Luis
From | Date | Subject | |
---|---|---|---|
Next Message | Guilherme | 2007-10-11 01:23:04 | drop table cascade doesn't drop manual sequences |
Previous Message | Tom Lane | 2007-10-10 22:16:52 | Re: preferred way to use PG_GETARG_BYTEA_P in SPI |