summaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-12-13 19:46:01 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-12-13 19:46:01 +0000
commit3a4f7dde16ad81b2319b9a4924a6023710a2fefd (patch)
tree248cf66fd94d40072b5ba8bb8e5437a6ea8399e5 /src/include/utils
parent77b7a740f95250af7d78f69e9c906c3e53f32e7b (diff)
downloadpostgresql-3a4f7dde16ad81b2319b9a4924a6023710a2fefd.tar.gz
Phase 3 of read-only-plans project: ExecInitExpr now builds expression
execution state trees, and ExecEvalExpr takes an expression state tree not an expression plan tree. The plan tree is now read-only as far as the executor is concerned. Next step is to begin actually exploiting this property.
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/fcache.h70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/include/utils/fcache.h b/src/include/utils/fcache.h
deleted file mode 100644
index f043eb0428..0000000000
--- a/src/include/utils/fcache.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fcache.h
- * Declarations for function cache records.
- *
- * The first time any Oper or Func node is evaluated, we compute a cache
- * record for the function being invoked, and save a pointer to the cache
- * record in the Oper or Func node. This saves repeated lookup of info
- * about the function.
- *
- * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * $Id: fcache.h,v 1.23 2002/06/20 20:29:52 momjian Exp $
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FCACHE_H
-#define FCACHE_H
-
-#include "fmgr.h"
-#include "nodes/execnodes.h"
-
-/*
- * A FunctionCache record is built for all functions regardless of language.
- *
- * We store the fmgr lookup info to avoid recomputing it on each call.
- *
- * We also need to store argument values across calls when evaluating a
- * function-returning-set. This is pretty ugly (and not re-entrant);
- * current-evaluation info should be somewhere in the econtext, not in
- * the querytree. As it stands, a function-returning-set can't safely be
- * recursive, at least not if it's in plpgsql which will try to re-use
- * the querytree at multiple execution nesting levels. FIXME someday.
- */
-
-typedef struct FunctionCache
-{
- /*
- * Function manager's lookup info for the target function.
- */
- FmgrInfo func;
-
- /*
- * setArgsValid is true when we are evaluating a set-valued function
- * and we are in the middle of a call series; we want to pass the same
- * argument values to the function again (and again, until it returns
- * ExprEndResult).
- */
- bool setArgsValid;
-
- /*
- * Flag to remember whether we found a set-valued argument to the
- * function. This causes the function result to be a set as well.
- * Valid only when setArgsValid is true.
- */
- bool setHasSetArg; /* some argument returns a set */
-
- /*
- * Current argument data for a set-valued function; contains valid
- * data only if setArgsValid is true.
- */
- FunctionCallInfoData setArgs;
-} FunctionCache;
-
-
-extern FunctionCachePtr init_fcache(Oid foid, int nargs,
- MemoryContext fcacheCxt);
-
-#endif /* FCACHE_H */