a_ogawa <a_ogawa@hi-ho.ne.jp> writes:
> This patch uses InitFunctionCallInfoData macro instead of MemSet to
> initialize FunctionCallInfoData.
> An idea of this patch discussed in the "FunctionCallN improvement" thread.
> (http://archives.postgresql.org/pgsql-hackers/2005-01/msg01054.php)
Looks good --- applied with minor changes. I figured that if we were
going to make InitFunctionCallInfoData generally available, we had
better fix it to cover initializing the context and resultinfo fields
per caller option. Also cleaned up a couple of other places that
already had hand-optimized calling sequences, and can now be written
more cleanly using the macro. Also, I removed this code you added in
a couple places:
+ /*
+ * argnull is initialized here for safety. Because it might not be
+ * set by ExecEvalExpr.
+ */
+ fcinfo->argnull[i] = false;
If ExecEvalExpr fails to set its isNull argument we will have breakage
all over; there is no need for speed-critical code to assume it has
to do this.
regards, tom lane