Tom Lane wrote:
> Based on this I think we ought to go with the "unrolled" approach, ie,
> we'll create a macro to initialize the fixed fields of fcinfo but fill
> in the arg and argisnull arrays with code like what's already in
> FunctionCall2:
I agree. The unrolled approach is a good result in most environments.
I think that a new macro becomes the following:
#define InitFunctionCallInfoData(Fcinfo, Flinfo, Nargs) \ do { \
(Fcinfo)->flinfo= Flinfo; \ (Fcinfo)->context = NULL; \
(Fcinfo)->resultinfo= NULL; \ (Fcinfo)->isnull = false; \
(Fcinfo)->nargs= Nargs; \ } while(0)
I think that this macro is effective also in other function such as
ExecMakeFunctionResultNoSets. However, we should apply that after
actually examining the effect.
First of all, this macro will be applied only to fmgr.c, but I think
we better define it in fmgr.h.
regards,
---
A.Ogawa ( a_ogawa@hi-ho.ne.jp )