OSDN Git Service

Avoid using a local FunctionCallInfoData struct in ExecMakeFunctionResult
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 1 Nov 2010 17:54:21 +0000 (13:54 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 1 Nov 2010 17:54:21 +0000 (13:54 -0400)
commit0811ff2063be973953eda89e76dac0d299f0fb6b
tree03c0af84b18c3f783315bcad9805c883ef9fadc7
parent931b6db39b808608a3c80c42b47e3cbcda9e66db
Avoid using a local FunctionCallInfoData struct in ExecMakeFunctionResult
and related routines.

We already had a redundant FunctionCallInfoData struct in FuncExprState,
but were using that copy only in set-returning-function cases, to avoid
keeping function evaluation state in the expression tree for the benefit
of plpgsql's "simple expression" logic.  But of course that didn't work
anyway.  Given the recent fixes in plpgsql there is no need to have two
separate behaviors here.  Getting rid of the local FunctionCallInfoData
structs should make things a little faster (because we don't need to do
InitFunctionCallInfoData each time), and it also makes for a noticeable
reduction in stack space consumption during recursive calls.
src/backend/executor/execQual.c
src/include/nodes/execnodes.h