mirror of
https://github.com/postgres/postgres.git
synced 2026-02-10 06:13:34 -05:00
directly to the appropriate per-node execution function, using a function pointer stored by ExecInitExpr. This speeds things up by eliminating one level of function call. The function-pointer technique also enables further small improvements such as only making one-time tests once (and then changing the function pointer). Overall this seems to gain about 10% on evaluation of simple expressions, which isn't earthshaking but seems a worthwhile gain for a relatively small hack. Per recent discussion on pghackers.
29 lines
911 B
C
29 lines
911 B
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* nodeSubplan.h
|
|
*
|
|
*
|
|
*
|
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $PostgreSQL: pgsql/src/include/executor/nodeSubplan.h,v 1.20 2004/03/17 01:02:24 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef NODESUBPLAN_H
|
|
#define NODESUBPLAN_H
|
|
|
|
#include "nodes/execnodes.h"
|
|
|
|
extern void ExecInitSubPlan(SubPlanState *node, EState *estate);
|
|
extern Datum ExecSubPlan(SubPlanState *node,
|
|
ExprContext *econtext,
|
|
bool *isNull,
|
|
ExprDoneCond *isDone);
|
|
extern void ExecEndSubPlan(SubPlanState *node);
|
|
extern void ExecReScanSetParamPlan(SubPlanState *node, PlanState *parent);
|
|
|
|
extern void ExecSetParamPlan(SubPlanState *node, ExprContext *econtext);
|
|
|
|
#endif /* NODESUBPLAN_H */
|