aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/executor')
-rw-r--r--src/include/executor/execFlatten.h13
-rw-r--r--src/include/executor/execdebug.h360
-rw-r--r--src/include/executor/execdefs.h44
-rw-r--r--src/include/executor/execdesc.h32
-rw-r--r--src/include/executor/executor.h189
-rw-r--r--src/include/executor/functions.h18
-rw-r--r--src/include/executor/hashjoin.h97
-rw-r--r--src/include/executor/nodeAgg.h18
-rw-r--r--src/include/executor/nodeAppend.h18
-rw-r--r--src/include/executor/nodeGroup.h18
-rw-r--r--src/include/executor/nodeHash.h41
-rw-r--r--src/include/executor/nodeHashjoin.h23
-rw-r--r--src/include/executor/nodeIndexscan.h29
-rw-r--r--src/include/executor/nodeMaterial.h22
-rw-r--r--src/include/executor/nodeMergejoin.h18
-rw-r--r--src/include/executor/nodeNestloop.h18
-rw-r--r--src/include/executor/nodeResult.h18
-rw-r--r--src/include/executor/nodeSeqscan.h24
-rw-r--r--src/include/executor/nodeSort.h22
-rw-r--r--src/include/executor/nodeTee.h20
-rw-r--r--src/include/executor/nodeUnique.h18
-rw-r--r--src/include/executor/spi.h81
-rw-r--r--src/include/executor/tuptable.h76
23 files changed, 624 insertions, 593 deletions
diff --git a/src/include/executor/execFlatten.h b/src/include/executor/execFlatten.h
index 6a7f26a729b..d51864edf0e 100644
--- a/src/include/executor/execFlatten.h
+++ b/src/include/executor/execFlatten.h
@@ -1,24 +1,21 @@
/*-------------------------------------------------------------------------
*
* execFlatten.h--
- * prototypes for execFlatten.c.
+ * prototypes for execFlatten.c.
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execFlatten.h,v 1.2 1997/08/19 21:38:12 momjian Exp $
+ * $Id: execFlatten.h,v 1.3 1997/09/07 04:57:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef EXECFLATTEN_H
#define EXECFLATTEN_H
-extern Datum ExecEvalIter(Iter *iterNode, ExprContext *econtext, bool *resultIsNull, bool *iterIsDone);
-
-extern void ExecEvalFjoin(TargetEntry *tlist, ExprContext *econtext, bool *isNullVect, bool *fj_isDone);
-
-
-#endif /* EXECFLATTEN_H */
+extern Datum ExecEvalIter(Iter * iterNode, ExprContext * econtext, bool * resultIsNull, bool * iterIsDone);
+extern void ExecEvalFjoin(TargetEntry * tlist, ExprContext * econtext, bool * isNullVect, bool * fj_isDone);
+#endif /* EXECFLATTEN_H */
diff --git a/src/include/executor/execdebug.h b/src/include/executor/execdebug.h
index 3a47ef01aa1..61d298403b3 100644
--- a/src/include/executor/execdebug.h
+++ b/src/include/executor/execdebug.h
@@ -1,12 +1,12 @@
/*-------------------------------------------------------------------------
*
* execdebug.h--
- * #defines governing debugging behaviour in the executor
+ * #defines governing debugging behaviour in the executor
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execdebug.h,v 1.2 1996/11/08 00:46:14 scrappy Exp $
+ * $Id: execdebug.h,v 1.3 1997/09/07 04:57:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,368 +16,368 @@
#include "access/printtup.h"
/* ----------------------------------------------------------------
- * debugging defines.
+ * debugging defines.
*
- * If you want certain debugging behaviour, then #define
- * the variable to 1, else #undef it. -cim 10/26/89
+ * If you want certain debugging behaviour, then #define
+ * the variable to 1, else #undef it. -cim 10/26/89
* ----------------------------------------------------------------
*/
/* ----------------
- * EXEC_DEBUGSTORETUP is for tuple table debugging - this
- * will print a message every time we call ExecStoreTuple.
- * -cim 3/20/91
+ * EXEC_DEBUGSTORETUP is for tuple table debugging - this
+ * will print a message every time we call ExecStoreTuple.
+ * -cim 3/20/91
* ----------------
*/
#undef EXEC_DEBUGSTORETUP
/* ----------------
- * EXEC_TUPLECOUNT is a #define which causes the
- * executor keep track of tuple counts. This might be
- * causing some problems with the decstation stuff so
- * you might want to undefine this if you are doing work
- * on the decs - cim 10/20/89
+ * EXEC_TUPLECOUNT is a #define which causes the
+ * executor keep track of tuple counts. This might be
+ * causing some problems with the decstation stuff so
+ * you might want to undefine this if you are doing work
+ * on the decs - cim 10/20/89
* ----------------
*/
#undef EXEC_TUPLECOUNT
/* ----------------
- * EXEC_SHOWBUFSTATS controls whether or not buffer statistics
- * are shown for each query. -cim 2/9/89
+ * EXEC_SHOWBUFSTATS controls whether or not buffer statistics
+ * are shown for each query. -cim 2/9/89
* ----------------
*/
#undef EXEC_SHOWBUFSTATS
/* ----------------
- * EXEC_CONTEXTDEBUG turns on the printing of debugging information
- * by CXT_printf() calls regarding which memory context is the
- * CurrentMemoryContext for palloc() calls.
+ * EXEC_CONTEXTDEBUG turns on the printing of debugging information
+ * by CXT_printf() calls regarding which memory context is the
+ * CurrentMemoryContext for palloc() calls.
* ----------------
*/
#undef EXEC_CONTEXTDEBUG
/* ----------------
- * EXEC_RETURNSIZE is a compile flag governing the
- * behaviour of lispFmgr.. See ExecMakeFunctionResult().
- * Undefining this avoids a problem in the system cache.
+ * EXEC_RETURNSIZE is a compile flag governing the
+ * behaviour of lispFmgr.. See ExecMakeFunctionResult().
+ * Undefining this avoids a problem in the system cache.
*
- * Note: undefining this means that there is incorrect
- * information in the const nodes corresponding
- * to function (or operator) results. The thing is,
- * 99% of the time this is fine because when you do
- * something like x = emp.sal + 1, you already know
- * the type and size of x so the fact that + didn't
- * return the correct size doesn't matter.
- * With variable length stuff the size is stored in
- * the first few bytes of the data so again, it's
- * not likely to matter.
+ * Note: undefining this means that there is incorrect
+ * information in the const nodes corresponding
+ * to function (or operator) results. The thing is,
+ * 99% of the time this is fine because when you do
+ * something like x = emp.sal + 1, you already know
+ * the type and size of x so the fact that + didn't
+ * return the correct size doesn't matter.
+ * With variable length stuff the size is stored in
+ * the first few bytes of the data so again, it's
+ * not likely to matter.
* ----------------
*/
#undef EXEC_RETURNSIZE
/* ----------------
- * EXEC_UTILSDEBUG is a flag which turns on debugging of the
- * executor utilities by EU_printf() in eutils.c
+ * EXEC_UTILSDEBUG is a flag which turns on debugging of the
+ * executor utilities by EU_printf() in eutils.c
* ----------------
*/
#undef EXEC_UTILSDEBUG
/* ----------------
- * EXEC_NESTLOOPDEBUG is a flag which turns on debugging of the
- * nest loop node by NL_printf() and ENL_printf() in nestloop.c
+ * EXEC_NESTLOOPDEBUG is a flag which turns on debugging of the
+ * nest loop node by NL_printf() and ENL_printf() in nestloop.c
* ----------------
*/
#undef EXEC_NESTLOOPDEBUG
/* ----------------
- * EXEC_PROCDEBUG is a flag which turns on debugging of
- * ExecProcNode() by PN_printf() in procnode.c
+ * EXEC_PROCDEBUG is a flag which turns on debugging of
+ * ExecProcNode() by PN_printf() in procnode.c
* ----------------
*/
#undef EXEC_PROCDEBUG
/* ----------------
- * EXEC_EVALDEBUG is a flag which turns on debugging of
- * ExecEval and ExecTargetList() stuff by EV_printf() in qual.c
+ * EXEC_EVALDEBUG is a flag which turns on debugging of
+ * ExecEval and ExecTargetList() stuff by EV_printf() in qual.c
* ----------------
*/
#undef EXEC_EVALDEBUG
/* ----------------
- * EXEC_SCANDEBUG is a flag which turns on debugging of
- * the ExecSeqScan() stuff by S_printf() in seqscan.c
+ * EXEC_SCANDEBUG is a flag which turns on debugging of
+ * the ExecSeqScan() stuff by S_printf() in seqscan.c
* ----------------
*/
#undef EXEC_SCANDEBUG
/* ----------------
- * EXEC_SORTDEBUG is a flag which turns on debugging of
- * the ExecSort() stuff by SO_printf() in sort.c
+ * EXEC_SORTDEBUG is a flag which turns on debugging of
+ * the ExecSort() stuff by SO_printf() in sort.c
* ----------------
*/
#undef EXEC_SORTDEBUG
/* ----------------
- * EXEC_MERGEJOINDEBUG is a flag which turns on debugging of
- * the ExecMergeJoin() stuff by MJ_printf() in mergejoin.c
+ * EXEC_MERGEJOINDEBUG is a flag which turns on debugging of
+ * the ExecMergeJoin() stuff by MJ_printf() in mergejoin.c
* ----------------
*/
#undef EXEC_MERGEJOINDEBUG
/* ----------------
- * EXEC_MERGEJOINPFREE is a flag which causes merge joins
- * to pfree intermittant tuples (which is the proper thing)
- * Not defining this means we avoid menory management problems
- * at the cost of doing deallocation of stuff only at the
- * end of the transaction
+ * EXEC_MERGEJOINPFREE is a flag which causes merge joins
+ * to pfree intermittant tuples (which is the proper thing)
+ * Not defining this means we avoid menory management problems
+ * at the cost of doing deallocation of stuff only at the
+ * end of the transaction
* ----------------
*/
#undef EXEC_MERGEJOINPFREE
/* ----------------
- * EXEC_DEBUGINTERACTIVE is a flag which enables the
- * user to issue "DEBUG" commands from an interactive
- * backend.
+ * EXEC_DEBUGINTERACTIVE is a flag which enables the
+ * user to issue "DEBUG" commands from an interactive
+ * backend.
* ----------------
*/
#undef EXEC_DEBUGINTERACTIVE
/* ----------------
- * EXEC_DEBUGVARIABLEFILE is string, which if defined will
- * be loaded when the executor is initialized. If this
- * string is not defined then nothing will be loaded..
+ * EXEC_DEBUGVARIABLEFILE is string, which if defined will
+ * be loaded when the executor is initialized. If this
+ * string is not defined then nothing will be loaded..
*
- * Example:
+ * Example:
*
* #define EXEC_DEBUGVARIABLEFILE "/a/postgres/cimarron/.pg_debugvars"
#
- * Note: since these variables are read at execution time,
- * they can't affect the first query.. this hack should be
- * replaced by something better sometime. -cim 11/2/89
+ * Note: since these variables are read at execution time,
+ * they can't affect the first query.. this hack should be
+ * replaced by something better sometime. -cim 11/2/89
* ----------------
*/
#undef EXEC_DEBUGVARIABLEFILE
/* ----------------------------------------------------------------
- * #defines controlled by above definitions
+ * #defines controlled by above definitions
*
- * Note: most of these are "incomplete" because I didn't
- * need the ones not defined. More should be added
- * only as necessary -cim 10/26/89
+ * Note: most of these are "incomplete" because I didn't
+ * need the ones not defined. More should be added
+ * only as necessary -cim 10/26/89
* ----------------------------------------------------------------
*/
-#define T_OR_F(b) (b ? "true" : "false")
-#define NULL_OR_TUPLE(slot) (TupIsNull(slot) ? "null" : "a tuple")
+#define T_OR_F(b) (b ? "true" : "false")
+#define NULL_OR_TUPLE(slot) (TupIsNull(slot) ? "null" : "a tuple")
/* #define EXEC_TUPLECOUNT - XXX take out for now for executor stubbing -- jolly*/
/* ----------------
- * tuple count debugging defines
+ * tuple count debugging defines
* ----------------
*/
#ifdef EXEC_TUPLECOUNT
-extern int NTupleProcessed;
-extern int NTupleRetrieved;
-extern int NTupleReplaced;
-extern int NTupleAppended;
-extern int NTupleDeleted;
-extern int NIndexTupleProcessed;
-extern int NIndexTupleInserted;
-
-#define IncrRetrieved() NTupleRetrieved++
-#define IncrAppended() NTupleAppended++
-#define IncrDeleted() NTupleDeleted++
-#define IncrReplaced() NTupleReplaced++
-#define IncrInserted() NTupleInserted++
-#define IncrProcessed() NTupleProcessed++
+extern int NTupleProcessed;
+extern int NTupleRetrieved;
+extern int NTupleReplaced;
+extern int NTupleAppended;
+extern int NTupleDeleted;
+extern int NIndexTupleProcessed;
+extern int NIndexTupleInserted;
+
+#define IncrRetrieved() NTupleRetrieved++
+#define IncrAppended() NTupleAppended++
+#define IncrDeleted() NTupleDeleted++
+#define IncrReplaced() NTupleReplaced++
+#define IncrInserted() NTupleInserted++
+#define IncrProcessed() NTupleProcessed++
#define IncrIndexProcessed() NIndexTupleProcessed++
-#define IncrIndexInserted() NIndexTupleInserted++
+#define IncrIndexInserted() NIndexTupleInserted++
#else
#define IncrRetrieved()
-#define IncrAppended()
-#define IncrDeleted()
-#define IncrReplaced()
-#define IncrInserted()
+#define IncrAppended()
+#define IncrDeleted()
+#define IncrReplaced()
+#define IncrInserted()
#define IncrProcessed()
#define IncrIndexProcessed()
#define IncrIndexInserted()
-#endif /* EXEC_TUPLECOUNT */
+#endif /* EXEC_TUPLECOUNT */
/* ----------------
- * memory context debugging defines
+ * memory context debugging defines
* ----------------
*/
#ifdef EXEC_CONTEXTDEBUG
-#define CXT_printf(s) printf(s)
-#define CXT1_printf(s, a) printf(s, a)
+#define CXT_printf(s) printf(s)
+#define CXT1_printf(s, a) printf(s, a)
#else
-#define CXT_printf(s)
-#define CXT1_printf(s, a)
-#endif /* EXEC_CONTEXTDEBUG */
+#define CXT_printf(s)
+#define CXT1_printf(s, a)
+#endif /* EXEC_CONTEXTDEBUG */
/* ----------------
- * eutils debugging defines
+ * eutils debugging defines
* ----------------
*/
#ifdef EXEC_UTILSDEBUG
-#define EU_nodeDisplay(l) nodeDisplay(l, 0)
-#define EU_printf(s) printf(s)
-#define EU1_printf(s, a) printf(s, a)
-#define EU2_printf(s, a) printf(s, a, b)
-#define EU3_printf(s, a) printf(s, a, b, c)
-#define EU4_printf(s, a, b, c, d) printf(s, a, b, c, d)
+#define EU_nodeDisplay(l) nodeDisplay(l, 0)
+#define EU_printf(s) printf(s)
+#define EU1_printf(s, a) printf(s, a)
+#define EU2_printf(s, a) printf(s, a, b)
+#define EU3_printf(s, a) printf(s, a, b, c)
+#define EU4_printf(s, a, b, c, d) printf(s, a, b, c, d)
#else
-#define EU_nodeDisplay(l)
-#define EU_printf(s)
-#define EU1_printf(s, a)
+#define EU_nodeDisplay(l)
+#define EU_printf(s)
+#define EU1_printf(s, a)
#define EU2_printf(s, a, b)
#define EU3_printf(s, a, b, c)
-#define EU4_printf(s, a, b, c, d)
-#endif /* EXEC_UTILSDEBUG */
+#define EU4_printf(s, a, b, c, d)
+#endif /* EXEC_UTILSDEBUG */
/* ----------------
- * nest loop debugging defines
+ * nest loop debugging defines
* ----------------
*/
#ifdef EXEC_NESTLOOPDEBUG
-#define NL_nodeDisplay(l) nodeDisplay(l, 0)
-#define NL_printf(s) printf(s)
-#define NL1_printf(s, a) printf(s, a)
-#define NL4_printf(s, a, b, c, d) printf(s, a, b, c, d)
-#define ENL1_printf(message) printf("ExecNestLoop: %s\n", message)
+#define NL_nodeDisplay(l) nodeDisplay(l, 0)
+#define NL_printf(s) printf(s)
+#define NL1_printf(s, a) printf(s, a)
+#define NL4_printf(s, a, b, c, d) printf(s, a, b, c, d)
+#define ENL1_printf(message) printf("ExecNestLoop: %s\n", message)
#else
-#define NL_nodeDisplay(l)
-#define NL_printf(s)
-#define NL1_printf(s, a)
-#define NL4_printf(s, a, b, c, d)
+#define NL_nodeDisplay(l)
+#define NL_printf(s)
+#define NL1_printf(s, a)
+#define NL4_printf(s, a, b, c, d)
#define ENL1_printf(message)
-#endif /* EXEC_NESTLOOPDEBUG */
+#endif /* EXEC_NESTLOOPDEBUG */
/* ----------------
- * proc node debugging defines
+ * proc node debugging defines
* ----------------
*/
#ifdef EXEC_PROCDEBUG
-#define PN_printf(s) printf(s)
-#define PN1_printf(s, p) printf(s, p)
+#define PN_printf(s) printf(s)
+#define PN1_printf(s, p) printf(s, p)
#else
-#define PN_printf(s)
-#define PN1_printf(s, p)
-#endif /* EXEC_PROCDEBUG */
+#define PN_printf(s)
+#define PN1_printf(s, p)
+#endif /* EXEC_PROCDEBUG */
/* ----------------
- * exec eval / target list debugging defines
+ * exec eval / target list debugging defines
* ----------------
*/
#ifdef EXEC_EVALDEBUG
-#define EV_nodeDisplay(l) nodeDisplay(l, 0)
-#define EV_printf(s) printf(s)
-#define EV1_printf(s, a) printf(s, a)
+#define EV_nodeDisplay(l) nodeDisplay(l, 0)
+#define EV_printf(s) printf(s)
+#define EV1_printf(s, a) printf(s, a)
#define EV5_printf(s, a, b, c, d, e) printf(s, a, b, c, d, e)
#else
-#define EV_nodeDisplay(l)
-#define EV_printf(s)
-#define EV1_printf(s, a)
-#define EV5_printf(s, a, b, c, d, e)
-#endif /* EXEC_EVALDEBUG */
+#define EV_nodeDisplay(l)
+#define EV_printf(s)
+#define EV1_printf(s, a)
+#define EV5_printf(s, a, b, c, d, e)
+#endif /* EXEC_EVALDEBUG */
/* ----------------
- * scan debugging defines
+ * scan debugging defines
* ----------------
*/
#ifdef EXEC_SCANDEBUG
-#define S_nodeDisplay(l) nodeDisplay(l, 0)
-#define S_printf(s) printf(s)
-#define S1_printf(s, p) printf(s, p)
+#define S_nodeDisplay(l) nodeDisplay(l, 0)
+#define S_printf(s) printf(s)
+#define S1_printf(s, p) printf(s, p)
#else
-#define S_nodeDisplay(l)
-#define S_printf(s)
-#define S1_printf(s, p)
-#endif /* EXEC_SCANDEBUG */
-
+#define S_nodeDisplay(l)
+#define S_printf(s)
+#define S1_printf(s, p)
+#endif /* EXEC_SCANDEBUG */
+
/* ----------------
- * sort node debugging defines
+ * sort node debugging defines
* ----------------
*/
#ifdef EXEC_SORTDEBUG
-#define SO_nodeDisplay(l) nodeDisplay(l, 0)
-#define SO_printf(s) printf(s)
-#define SO1_printf(s, p) printf(s, p)
+#define SO_nodeDisplay(l) nodeDisplay(l, 0)
+#define SO_printf(s) printf(s)
+#define SO1_printf(s, p) printf(s, p)
#else
-#define SO_nodeDisplay(l)
-#define SO_printf(s)
-#define SO1_printf(s, p)
-#endif /* EXEC_SORTDEBUG */
+#define SO_nodeDisplay(l)
+#define SO_printf(s)
+#define SO1_printf(s, p)
+#endif /* EXEC_SORTDEBUG */
/* ----------------
- * merge join debugging defines
+ * merge join debugging defines
* ----------------
*/
#ifdef EXEC_MERGEJOINDEBUG
-#define MJ_nodeDisplay(l) nodeDisplay(l, 0)
-#define MJ_printf(s) printf(s)
-#define MJ1_printf(s, p) printf(s, p)
-#define MJ2_printf(s, p1, p2) printf(s, p1, p2)
-#define MJ_debugtup(tuple, type) debugtup(tuple, type)
-#define MJ_dump(context, state) ExecMergeTupleDump(econtext, state)
+#define MJ_nodeDisplay(l) nodeDisplay(l, 0)
+#define MJ_printf(s) printf(s)
+#define MJ1_printf(s, p) printf(s, p)
+#define MJ2_printf(s, p1, p2) printf(s, p1, p2)
+#define MJ_debugtup(tuple, type) debugtup(tuple, type)
+#define MJ_dump(context, state) ExecMergeTupleDump(econtext, state)
#define MJ_DEBUG_QUAL(clause, res) \
MJ2_printf(" ExecQual(%s, econtext) returns %s\n", \
- CppAsString(clause), T_OR_F(res));
-
+ CppAsString(clause), T_OR_F(res));
+
#define MJ_DEBUG_MERGE_COMPARE(qual, res) \
MJ2_printf(" MergeCompare(mergeclauses, %s, ..) returns %s\n", \
- CppAsString(qual), T_OR_F(res));
+ CppAsString(qual), T_OR_F(res));
#define MJ_DEBUG_PROC_NODE(slot) \
MJ2_printf(" %s = ExecProcNode(innerPlan) returns %s\n", \
- CppAsString(slot), NULL_OR_TUPLE(slot));
+ CppAsString(slot), NULL_OR_TUPLE(slot));
#else
#define MJ_nodeDisplay(l)
-#define MJ_printf(s)
-#define MJ1_printf(s, p)
+#define MJ_printf(s)
+#define MJ1_printf(s, p)
#define MJ2_printf(s, p1, p2)
#define MJ_debugtup(tuple, type)
#define MJ_dump(context, state)
#define MJ_DEBUG_QUAL(clause, res)
#define MJ_DEBUG_MERGE_COMPARE(qual, res)
#define MJ_DEBUG_PROC_NODE(slot)
-#endif /* EXEC_MERGEJOINDEBUG */
+#endif /* EXEC_MERGEJOINDEBUG */
/* ----------------------------------------------------------------
- * DO NOT DEFINE THESE EVER OR YOU WILL BURN!
+ * DO NOT DEFINE THESE EVER OR YOU WILL BURN!
* ----------------------------------------------------------------
*/
/* ----------------
- * DOESNOTWORK is currently placed around memory manager
- * code that is known to cause problems. Code in between
- * is likely not converted and probably won't work anyways.
+ * DOESNOTWORK is currently placed around memory manager
+ * code that is known to cause problems. Code in between
+ * is likely not converted and probably won't work anyways.
* ----------------
*/
#undef DOESNOTWORK
/* ----------------
- * PERHAPSNEVER is placed around the "scan attribute"
- * support code for the rule manager because for now we
- * do things inefficiently. The correct solution to our
- * problem is to add code to the parser/planner to save
- * attribute information for the rule manager rather than
- * have the executor have to grope through the entire plan
- * for it so if we ever decide to make things better,
- * we should probably delete the stuff in between PERHAPSNEVER..
+ * PERHAPSNEVER is placed around the "scan attribute"
+ * support code for the rule manager because for now we
+ * do things inefficiently. The correct solution to our
+ * problem is to add code to the parser/planner to save
+ * attribute information for the rule manager rather than
+ * have the executor have to grope through the entire plan
+ * for it so if we ever decide to make things better,
+ * we should probably delete the stuff in between PERHAPSNEVER..
* ----------------
*/
#undef PERHAPSNEVER
/* ----------------
- * NOTYET is placed around any code not yet implemented
- * in the executor. Only remove these when actually implementing
- * said code.
+ * NOTYET is placed around any code not yet implemented
+ * in the executor. Only remove these when actually implementing
+ * said code.
* ----------------
*/
#undef NOTYET
-extern long NDirectFileRead;
-extern long NDirectFileWrite;
+extern long NDirectFileRead;
+extern long NDirectFileWrite;
-#endif /* ExecDebugIncluded */
+#endif /* ExecDebugIncluded */
diff --git a/src/include/executor/execdefs.h b/src/include/executor/execdefs.h
index 2d6db792d8d..59748cfe9be 100644
--- a/src/include/executor/execdefs.h
+++ b/src/include/executor/execdefs.h
@@ -1,12 +1,12 @@
/*-------------------------------------------------------------------------
*
* execdefs.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execdefs.h,v 1.1 1996/08/28 07:22:07 scrappy Exp $
+ * $Id: execdefs.h,v 1.2 1997/09/07 04:57:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,34 +14,34 @@
#define EXECDEFS_H
/* ----------------
- * ExecutePlan() tuplecount definitions
+ * ExecutePlan() tuplecount definitions
* ----------------
*/
-#define ALL_TUPLES 0 /* return all tuples */
-#define ONE_TUPLE 1 /* return only one tuple */
+#define ALL_TUPLES 0 /* return all tuples */
+#define ONE_TUPLE 1 /* return only one tuple */
/* ----------------
- * constants used by ExecMain
+ * constants used by ExecMain
* ----------------
*/
-#define EXEC_RUN 3
-#define EXEC_FOR 4
-#define EXEC_BACK 5
-#define EXEC_RETONE 6
-#define EXEC_RESULT 7
+#define EXEC_RUN 3
+#define EXEC_FOR 4
+#define EXEC_BACK 5
+#define EXEC_RETONE 6
+#define EXEC_RESULT 7
/* ----------------
- * Merge Join states
+ * Merge Join states
* ----------------
*/
-#define EXEC_MJ_INITIALIZE 1
-#define EXEC_MJ_JOINMARK 2
-#define EXEC_MJ_JOINTEST 3
-#define EXEC_MJ_JOINTUPLES 4
-#define EXEC_MJ_NEXTOUTER 5
-#define EXEC_MJ_TESTOUTER 6
-#define EXEC_MJ_NEXTINNER 7
-#define EXEC_MJ_SKIPINNER 8
-#define EXEC_MJ_SKIPOUTER 9
+#define EXEC_MJ_INITIALIZE 1
+#define EXEC_MJ_JOINMARK 2
+#define EXEC_MJ_JOINTEST 3
+#define EXEC_MJ_JOINTUPLES 4
+#define EXEC_MJ_NEXTOUTER 5
+#define EXEC_MJ_TESTOUTER 6
+#define EXEC_MJ_NEXTINNER 7
+#define EXEC_MJ_SKIPINNER 8
+#define EXEC_MJ_SKIPOUTER 9
-#endif /* EXECDEFS_H */
+#endif /* EXECDEFS_H */
diff --git a/src/include/executor/execdesc.h b/src/include/executor/execdesc.h
index 2fb13bb9094..7f24b7630f0 100644
--- a/src/include/executor/execdesc.h
+++ b/src/include/executor/execdesc.h
@@ -1,13 +1,13 @@
/*-------------------------------------------------------------------------
*
* execdesc.h--
- * plan and query descriptor accessor macros used by the executor
- * and related modules.
+ * plan and query descriptor accessor macros used by the executor
+ * and related modules.
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execdesc.h,v 1.3 1996/11/05 08:18:31 scrappy Exp $
+ * $Id: execdesc.h,v 1.4 1997/09/07 04:57:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,20 +19,22 @@
#include <nodes/parsenodes.h>
/* ----------------
- * query descriptor:
- * a QueryDesc encapsulates everything that the executor
- * needs to execute the query
+ * query descriptor:
+ * a QueryDesc encapsulates everything that the executor
+ * needs to execute the query
* ---------------------
*/
-typedef struct QueryDesc {
- CmdType operation; /* CMD_SELECT, CMD_UPDATE, etc. */
- Query *parsetree;
- Plan *plantree;
- CommandDest dest; /* the destination output of the execution */
-} QueryDesc;
+typedef struct QueryDesc
+{
+ CmdType operation; /* CMD_SELECT, CMD_UPDATE, etc. */
+ Query *parsetree;
+ Plan *plantree;
+ CommandDest dest; /* the destination output of the execution */
+} QueryDesc;
/* in pquery.c */
-extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree,
- CommandDest dest);
+extern QueryDesc *
+CreateQueryDesc(Query * parsetree, Plan * plantree,
+ CommandDest dest);
-#endif /* EXECDESC_H */
+#endif /* EXECDESC_H */
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index ec7e61a523d..c96f7439b6c 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -1,12 +1,12 @@
/*-------------------------------------------------------------------------
*
* executor.h--
- * support for the POSTGRES executor module
+ * support for the POSTGRES executor module
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: executor.h,v 1.10 1997/08/22 14:39:33 vadim Exp $
+ * $Id: executor.h,v 1.11 1997/09/07 04:57:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,127 +26,146 @@
/*
* prototypes from functions in execAmi.c
*/
-extern void ExecOpenScanR(Oid relOid, int nkeys, ScanKey skeys, bool isindex,
- ScanDirection dir, TimeQual timeRange,
- Relation *returnRelation, Pointer *returnScanDesc);
-extern void ExecCloseR(Plan *node);
-extern void ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent);
-extern HeapScanDesc ExecReScanR(Relation relDesc, HeapScanDesc scanDesc,
- ScanDirection direction, int nkeys, ScanKey skeys);
-extern void ExecMarkPos(Plan *node);
-extern void ExecRestrPos(Plan *node);
+extern void
+ExecOpenScanR(Oid relOid, int nkeys, ScanKey skeys, bool isindex,
+ ScanDirection dir, TimeQual timeRange,
+ Relation * returnRelation, Pointer * returnScanDesc);
+extern void ExecCloseR(Plan * node);
+extern void ExecReScan(Plan * node, ExprContext * exprCtxt, Plan * parent);
+extern HeapScanDesc
+ExecReScanR(Relation relDesc, HeapScanDesc scanDesc,
+ ScanDirection direction, int nkeys, ScanKey skeys);
+extern void ExecMarkPos(Plan * node);
+extern void ExecRestrPos(Plan * node);
extern Relation ExecCreatR(TupleDesc tupType, Oid relationOid);
/*
* prototypes from functions in execJunk.c
*/
-extern JunkFilter *ExecInitJunkFilter(List *targetList);
-extern bool ExecGetJunkAttribute(JunkFilter *junkfilter, TupleTableSlot *slot,
- char *attrName, Datum *value, bool *isNull);
-extern HeapTuple ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot);
+extern JunkFilter *ExecInitJunkFilter(List * targetList);
+extern bool
+ExecGetJunkAttribute(JunkFilter * junkfilter, TupleTableSlot * slot,
+ char *attrName, Datum * value, bool * isNull);
+extern HeapTuple ExecRemoveJunk(JunkFilter * junkfilter, TupleTableSlot * slot);
/*
* prototypes from functions in execMain.c
*/
-extern TupleDesc ExecutorStart(QueryDesc *queryDesc, EState *estate);
-extern TupleTableSlot* ExecutorRun(QueryDesc *queryDesc, EState *estate, int feature, int count);
-extern void ExecutorEnd(QueryDesc *queryDesc, EState *estate);
-extern HeapTuple ExecConstraints (char *caller, Relation rel, HeapTuple tuple);
+extern TupleDesc ExecutorStart(QueryDesc * queryDesc, EState * estate);
+extern TupleTableSlot *ExecutorRun(QueryDesc * queryDesc, EState * estate, int feature, int count);
+extern void ExecutorEnd(QueryDesc * queryDesc, EState * estate);
+extern HeapTuple ExecConstraints(char *caller, Relation rel, HeapTuple tuple);
/*
* prototypes from functions in execProcnode.c
*/
-extern bool ExecInitNode(Plan *node, EState *estate, Plan *parent);
-extern TupleTableSlot *ExecProcNode(Plan *node, Plan *parent);
-extern int ExecCountSlotsNode(Plan *node);
-extern void ExecEndNode(Plan *node, Plan *parent);
+extern bool ExecInitNode(Plan * node, EState * estate, Plan * parent);
+extern TupleTableSlot *ExecProcNode(Plan * node, Plan * parent);
+extern int ExecCountSlotsNode(Plan * node);
+extern void ExecEndNode(Plan * node, Plan * parent);
/*
* prototypes from functions in execQual.c
*/
-extern bool execConstByVal;
-extern int execConstLen;
+extern bool execConstByVal;
+extern int execConstLen;
+
+extern Datum
+ExecExtractResult(TupleTableSlot * slot, AttrNumber attnum,
+ bool * isNull);
+extern Datum
+ExecEvalParam(Param * expression, ExprContext * econtext,
+ bool * isNull);
-extern Datum ExecExtractResult(TupleTableSlot *slot, AttrNumber attnum,
- bool *isNull);
-extern Datum ExecEvalParam(Param *expression, ExprContext *econtext,
- bool *isNull);
/* stop here */
-extern char *GetAttributeByName(TupleTableSlot *slot, char *attname,
- bool *isNull);
-extern Datum ExecEvalExpr(Node *expression, ExprContext *econtext, bool *isNull,
- bool *isDone);
-extern bool ExecQual(List *qual, ExprContext *econtext);
-extern int ExecTargetListLength(List *targetlist);
-extern TupleTableSlot *ExecProject(ProjectionInfo *projInfo, bool *isDone);
+extern char *
+GetAttributeByName(TupleTableSlot * slot, char *attname,
+ bool * isNull);
+extern Datum
+ExecEvalExpr(Node * expression, ExprContext * econtext, bool * isNull,
+ bool * isDone);
+extern bool ExecQual(List * qual, ExprContext * econtext);
+extern int ExecTargetListLength(List * targetlist);
+extern TupleTableSlot *ExecProject(ProjectionInfo * projInfo, bool * isDone);
/*
* prototypes from functions in execScan.c
*/
-extern TupleTableSlot *ExecScan(Scan *node, TupleTableSlot* (*accessMtd)());
+extern TupleTableSlot *ExecScan(Scan * node, TupleTableSlot * (*accessMtd) ());
/*
* prototypes from functions in execTuples.c
*/
extern TupleTable ExecCreateTupleTable(int initialSize);
-extern void ExecDestroyTupleTable(TupleTable table, bool shouldFree);
-extern TupleTableSlot* ExecAllocTableSlot(TupleTable table);
-extern TupleTableSlot* ExecStoreTuple(HeapTuple tuple,
- TupleTableSlot *slot,
- Buffer buffer,
- bool shouldFree);
-extern TupleTableSlot* ExecClearTuple(TupleTableSlot* slot);
-extern bool ExecSetSlotPolicy(TupleTableSlot *slot, bool shouldFree);
-extern TupleDesc ExecSetSlotDescriptor(TupleTableSlot *slot,
- TupleDesc tupdesc);
-extern void ExecSetSlotDescriptorIsNew(TupleTableSlot *slot, bool isNew);
-extern void ExecIncrSlotBufferRefcnt(TupleTableSlot *slot);
-extern bool TupIsNull(TupleTableSlot* slot);
-extern void ExecInitResultTupleSlot(EState *estate, CommonState *commonstate);
-extern void ExecInitScanTupleSlot(EState *estate,
- CommonScanState *commonscanstate);
-extern void ExecInitMarkedTupleSlot(EState *estate, MergeJoinState *mergestate);
-extern void ExecInitOuterTupleSlot(EState *estate, HashJoinState *hashstate);
-
-extern TupleDesc ExecGetTupType(Plan *node);
-extern TupleDesc ExecTypeFromTL(List *targetList);
+extern void ExecDestroyTupleTable(TupleTable table, bool shouldFree);
+extern TupleTableSlot *ExecAllocTableSlot(TupleTable table);
+extern TupleTableSlot *
+ExecStoreTuple(HeapTuple tuple,
+ TupleTableSlot * slot,
+ Buffer buffer,
+ bool shouldFree);
+extern TupleTableSlot *ExecClearTuple(TupleTableSlot * slot);
+extern bool ExecSetSlotPolicy(TupleTableSlot * slot, bool shouldFree);
+extern TupleDesc
+ExecSetSlotDescriptor(TupleTableSlot * slot,
+ TupleDesc tupdesc);
+extern void ExecSetSlotDescriptorIsNew(TupleTableSlot * slot, bool isNew);
+extern void ExecIncrSlotBufferRefcnt(TupleTableSlot * slot);
+extern bool TupIsNull(TupleTableSlot * slot);
+extern void ExecInitResultTupleSlot(EState * estate, CommonState * commonstate);
+extern void
+ExecInitScanTupleSlot(EState * estate,
+ CommonScanState * commonscanstate);
+extern void ExecInitMarkedTupleSlot(EState * estate, MergeJoinState * mergestate);
+extern void ExecInitOuterTupleSlot(EState * estate, HashJoinState * hashstate);
+
+extern TupleDesc ExecGetTupType(Plan * node);
+extern TupleDesc ExecTypeFromTL(List * targetList);
/*
* prototypes from functions in execTuples.c
*/
-extern void ResetTupleCount(void);
-extern void ExecAssignNodeBaseInfo(EState *estate, CommonState *basenode,
- Plan *parent);
-extern void ExecAssignExprContext(EState *estate, CommonState *commonstate);
-extern void ExecAssignResultType(CommonState *commonstate,
- TupleDesc tupDesc);
-extern void ExecAssignResultTypeFromOuterPlan(Plan *node,
- CommonState *commonstate);
-extern void ExecAssignResultTypeFromTL(Plan *node, CommonState *commonstate);
-extern TupleDesc ExecGetResultType(CommonState *commonstate);
-extern void ExecAssignProjectionInfo(Plan *node, CommonState *commonstate);
-extern void ExecFreeProjectionInfo(CommonState *commonstate);
-extern TupleDesc ExecGetScanType(CommonScanState *csstate);
-extern void ExecAssignScanType(CommonScanState *csstate,
- TupleDesc tupDesc);
-extern void ExecAssignScanTypeFromOuterPlan(Plan *node,
- CommonScanState *csstate);
+extern void ResetTupleCount(void);
+extern void
+ExecAssignNodeBaseInfo(EState * estate, CommonState * basenode,
+ Plan * parent);
+extern void ExecAssignExprContext(EState * estate, CommonState * commonstate);
+extern void
+ExecAssignResultType(CommonState * commonstate,
+ TupleDesc tupDesc);
+extern void
+ExecAssignResultTypeFromOuterPlan(Plan * node,
+ CommonState * commonstate);
+extern void ExecAssignResultTypeFromTL(Plan * node, CommonState * commonstate);
+extern TupleDesc ExecGetResultType(CommonState * commonstate);
+extern void ExecAssignProjectionInfo(Plan * node, CommonState * commonstate);
+extern void ExecFreeProjectionInfo(CommonState * commonstate);
+extern TupleDesc ExecGetScanType(CommonScanState * csstate);
+extern void
+ExecAssignScanType(CommonScanState * csstate,
+ TupleDesc tupDesc);
+extern void
+ExecAssignScanTypeFromOuterPlan(Plan * node,
+ CommonScanState * csstate);
extern AttributeTupleForm ExecGetTypeInfo(Relation relDesc);
-extern void ExecOpenIndices(Oid resultRelationOid,
- RelationInfo *resultRelationInfo);
-extern void ExecCloseIndices(RelationInfo *resultRelationInfo);
-extern void ExecInsertIndexTuples(TupleTableSlot *slot, ItemPointer tupleid,
- EState *estate, bool is_update);
-extern void resetVarAttrLenForCreateTable(TupleDesc tupType);
-extern void setVarAttrLenForCreateTable(TupleDesc tupType,
- List *targetList, List *rangeTable);
+extern void
+ExecOpenIndices(Oid resultRelationOid,
+ RelationInfo * resultRelationInfo);
+extern void ExecCloseIndices(RelationInfo * resultRelationInfo);
+extern void
+ExecInsertIndexTuples(TupleTableSlot * slot, ItemPointer tupleid,
+ EState * estate, bool is_update);
+extern void resetVarAttrLenForCreateTable(TupleDesc tupType);
+extern void
+setVarAttrLenForCreateTable(TupleDesc tupType,
+ List * targetList, List * rangeTable);
/* ----------------------------------------------------------------
- * the end
+ * the end
* ----------------------------------------------------------------
*/
-#endif /* EXECUTOR_H */
+#endif /* EXECUTOR_H */
diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h
index e404b0cbe42..475f9309b8c 100644
--- a/src/include/executor/functions.h
+++ b/src/include/executor/functions.h
@@ -1,22 +1,24 @@
/*-------------------------------------------------------------------------
*
* functions.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: functions.h,v 1.1 1996/08/28 07:22:12 scrappy Exp $
+ * $Id: functions.h,v 1.2 1997/09/07 04:57:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef FUNCTIONS_H
+#ifndef FUNCTIONS_H
#define FUNCTIONS_H
-extern Datum ProjectAttribute(TupleDesc TD, TargetEntry *tlist,
- HeapTuple tup, bool *isnullP);
+extern Datum
+ProjectAttribute(TupleDesc TD, TargetEntry * tlist,
+ HeapTuple tup, bool * isnullP);
-extern Datum postquel_function(Func *funcNode, char **args,
- bool *isNull, bool *isDone);
+extern Datum
+postquel_function(Func * funcNode, char **args,
+ bool * isNull, bool * isDone);
-#endif /* FUNCTIONS_H */
+#endif /* FUNCTIONS_H */
diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h
index 6bee61ef766..e705c5c77d6 100644
--- a/src/include/executor/hashjoin.h
+++ b/src/include/executor/hashjoin.h
@@ -1,81 +1,84 @@
/*-------------------------------------------------------------------------
*
* hashjoin.h--
- * internal structures for hash table and buckets
+ * internal structures for hash table and buckets
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: hashjoin.h,v 1.3 1996/11/04 08:52:46 scrappy Exp $
+ * $Id: hashjoin.h,v 1.4 1997/09/07 04:57:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef HASHJOIN_H
+#ifndef HASHJOIN_H
#define HASHJOIN_H
#include <storage/ipc.h>
/* -----------------
- * have to use relative address as pointers in the hashtable
- * because the hashtable may reallocate in difference processes
+ * have to use relative address as pointers in the hashtable
+ * because the hashtable may reallocate in difference processes
* -----------------
*/
-typedef int RelativeAddr;
+typedef int RelativeAddr;
/* ------------------
- * the relative addresses are always relative to the head of the
- * hashtable, the following macro converts them to absolute address.
+ * the relative addresses are always relative to the head of the
+ * hashtable, the following macro converts them to absolute address.
* ------------------
*/
-#define ABSADDR(X) ((X) < 0 ? NULL: (char*)hashtable + X)
-#define RELADDR(X) (RelativeAddr)((char*)(X) - (char*)hashtable)
+#define ABSADDR(X) ((X) < 0 ? NULL: (char*)hashtable + X)
+#define RELADDR(X) (RelativeAddr)((char*)(X) - (char*)hashtable)
-typedef char **charPP;
-typedef int *intP;
+typedef char **charPP;
+typedef int *intP;
/* ----------------------------------------------------------------
- * hash-join hash table structures
+ * hash-join hash table structures
* ----------------------------------------------------------------
*/
-typedef struct HashTableData {
- int nbuckets;
- int totalbuckets;
- int bucketsize;
- IpcMemoryId shmid;
- RelativeAddr top; /* char* */
- RelativeAddr bottom; /* char* */
- RelativeAddr overflownext; /* char* */
- RelativeAddr batch; /* char* */
- RelativeAddr readbuf; /* char* */
- int nbatch;
- RelativeAddr outerbatchNames; /* RelativeAddr* */
- RelativeAddr outerbatchPos; /* RelativeAddr* */
- RelativeAddr innerbatchNames; /* RelativeAddr* */
- RelativeAddr innerbatchPos; /* RelativeAddr* */
- RelativeAddr innerbatchSizes; /* int* */
- int curbatch;
- int nprocess;
- int pcount;
-} HashTableData; /* real hash table follows here */
+typedef struct HashTableData
+{
+ int nbuckets;
+ int totalbuckets;
+ int bucketsize;
+ IpcMemoryId shmid;
+ RelativeAddr top; /* char* */
+ RelativeAddr bottom; /* char* */
+ RelativeAddr overflownext; /* char* */
+ RelativeAddr batch; /* char* */
+ RelativeAddr readbuf; /* char* */
+ int nbatch;
+ RelativeAddr outerbatchNames; /* RelativeAddr* */
+ RelativeAddr outerbatchPos; /* RelativeAddr* */
+ RelativeAddr innerbatchNames; /* RelativeAddr* */
+ RelativeAddr innerbatchPos; /* RelativeAddr* */
+ RelativeAddr innerbatchSizes; /* int* */
+ int curbatch;
+ int nprocess;
+ int pcount;
+} HashTableData; /* real hash table follows here */
-typedef HashTableData *HashJoinTable;
+typedef HashTableData *HashJoinTable;
-typedef struct OverflowTupleData {
- RelativeAddr tuple; /* HeapTuple */
- RelativeAddr next; /* struct OverflowTupleData * */
-} OverflowTupleData; /* real tuple follows here */
+typedef struct OverflowTupleData
+{
+ RelativeAddr tuple; /* HeapTuple */
+ RelativeAddr next; /* struct OverflowTupleData * */
+} OverflowTupleData; /* real tuple follows here */
typedef OverflowTupleData *OverflowTuple;
-typedef struct HashBucketData {
- RelativeAddr top; /* HeapTuple */
- RelativeAddr bottom; /* HeapTuple */
- RelativeAddr firstotuple; /* OverflowTuple */
- RelativeAddr lastotuple; /* OverflowTuple */
-} HashBucketData; /* real bucket follows here */
+typedef struct HashBucketData
+{
+ RelativeAddr top; /* HeapTuple */
+ RelativeAddr bottom; /* HeapTuple */
+ RelativeAddr firstotuple;/* OverflowTuple */
+ RelativeAddr lastotuple; /* OverflowTuple */
+} HashBucketData; /* real bucket follows here */
-typedef HashBucketData *HashBucket;
+typedef HashBucketData *HashBucket;
-#define HASH_PERMISSION 0700
+#define HASH_PERMISSION 0700
-#endif /* HASHJOIN_H */
+#endif /* HASHJOIN_H */
diff --git a/src/include/executor/nodeAgg.h b/src/include/executor/nodeAgg.h
index 9c46a03e207..bae4f1bc726 100644
--- a/src/include/executor/nodeAgg.h
+++ b/src/include/executor/nodeAgg.h
@@ -1,21 +1,21 @@
/*-------------------------------------------------------------------------
*
* nodeAgg.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeAgg.h,v 1.1 1996/08/28 07:22:14 scrappy Exp $
+ * $Id: nodeAgg.h,v 1.2 1997/09/07 04:57:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODEAGG_H
-#define NODEAGG_H
+#ifndef NODEAGG_H
+#define NODEAGG_H
-extern TupleTableSlot *ExecAgg(Agg *node);
-extern bool ExecInitAgg(Agg *node, EState *estate, Plan *parent);
-extern int ExecCountSlotsAgg(Agg *node);
-extern void ExecEndAgg(Agg *node);
+extern TupleTableSlot *ExecAgg(Agg * node);
+extern bool ExecInitAgg(Agg * node, EState * estate, Plan * parent);
+extern int ExecCountSlotsAgg(Agg * node);
+extern void ExecEndAgg(Agg * node);
-#endif /* NODEAGG_H */
+#endif /* NODEAGG_H */
diff --git a/src/include/executor/nodeAppend.h b/src/include/executor/nodeAppend.h
index f2ac25c2aee..2aa98a67c5b 100644
--- a/src/include/executor/nodeAppend.h
+++ b/src/include/executor/nodeAppend.h
@@ -1,21 +1,21 @@
/*-------------------------------------------------------------------------
*
* nodeAppend.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeAppend.h,v 1.2 1997/08/19 21:38:19 momjian Exp $
+ * $Id: nodeAppend.h,v 1.3 1997/09/07 04:57:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODEAPPEND_H
-#define NODEAPPEND_H
+#ifndef NODEAPPEND_H
+#define NODEAPPEND_H
-extern bool ExecInitAppend(Append *node, EState *estate, Plan *parent);
-extern int ExecCountSlotsAppend(Append *node);
-extern TupleTableSlot *ExecProcAppend(Append *node);
-extern void ExecEndAppend(Append *node);
+extern bool ExecInitAppend(Append * node, EState * estate, Plan * parent);
+extern int ExecCountSlotsAppend(Append * node);
+extern TupleTableSlot *ExecProcAppend(Append * node);
+extern void ExecEndAppend(Append * node);
-#endif /* NODEAPPEND_H */
+#endif /* NODEAPPEND_H */
diff --git a/src/include/executor/nodeGroup.h b/src/include/executor/nodeGroup.h
index 6a6da53ce8e..ddf32d766a5 100644
--- a/src/include/executor/nodeGroup.h
+++ b/src/include/executor/nodeGroup.h
@@ -1,21 +1,21 @@
/*-------------------------------------------------------------------------
*
* nodeGroup.h--
- * prototypes for nodeGroup.c
+ * prototypes for nodeGroup.c
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeGroup.h,v 1.1 1996/08/28 07:22:17 scrappy Exp $
+ * $Id: nodeGroup.h,v 1.2 1997/09/07 04:57:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODEGROUP_H
-#define NODEGROUP_H
+#ifndef NODEGROUP_H
+#define NODEGROUP_H
-extern TupleTableSlot *ExecGroup(Group *node);
-extern bool ExecInitGroup(Group *node, EState *estate, Plan *parent);
-extern int ExecCountSlotsGroup(Group *node);
-extern void ExecEndGroup(Group *node);
+extern TupleTableSlot *ExecGroup(Group * node);
+extern bool ExecInitGroup(Group * node, EState * estate, Plan * parent);
+extern int ExecCountSlotsGroup(Group * node);
+extern void ExecEndGroup(Group * node);
-#endif /* NODEGROUP_H */
+#endif /* NODEGROUP_H */
diff --git a/src/include/executor/nodeHash.h b/src/include/executor/nodeHash.h
index b588b44531b..561e192aaf5 100644
--- a/src/include/executor/nodeHash.h
+++ b/src/include/executor/nodeHash.h
@@ -1,31 +1,34 @@
/*-------------------------------------------------------------------------
*
* nodeHash.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeHash.h,v 1.2 1997/08/19 21:38:20 momjian Exp $
+ * $Id: nodeHash.h,v 1.3 1997/09/07 04:57:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODEHASH_H
-#define NODEHASH_H
+#ifndef NODEHASH_H
+#define NODEHASH_H
-extern TupleTableSlot *ExecHash(Hash *node);
-extern bool ExecInitHash(Hash *node, EState *estate, Plan *parent);
-extern int ExecCountSlotsHash(Hash *node);
-extern void ExecEndHash(Hash *node);
-extern HashJoinTable ExecHashTableCreate(Hash *node);
-extern void ExecHashTableInsert(HashJoinTable hashtable, ExprContext *econtext,
- Var *hashkey, File *batches);
-extern void ExecHashTableDestroy(HashJoinTable hashtable);
-extern int ExecHashGetBucket(HashJoinTable hashtable, ExprContext *econtext,
- Var *hashkey);
-extern HeapTuple ExecScanHashBucket(HashJoinState *hjstate, HashBucket bucket,
- HeapTuple curtuple, List *hjclauses,
- ExprContext *econtext);
-extern void ExecHashTableReset(HashJoinTable hashtable, int ntuples);
+extern TupleTableSlot *ExecHash(Hash * node);
+extern bool ExecInitHash(Hash * node, EState * estate, Plan * parent);
+extern int ExecCountSlotsHash(Hash * node);
+extern void ExecEndHash(Hash * node);
+extern HashJoinTable ExecHashTableCreate(Hash * node);
+extern void
+ExecHashTableInsert(HashJoinTable hashtable, ExprContext * econtext,
+ Var * hashkey, File * batches);
+extern void ExecHashTableDestroy(HashJoinTable hashtable);
+extern int
+ExecHashGetBucket(HashJoinTable hashtable, ExprContext * econtext,
+ Var * hashkey);
+extern HeapTuple
+ExecScanHashBucket(HashJoinState * hjstate, HashBucket bucket,
+ HeapTuple curtuple, List * hjclauses,
+ ExprContext * econtext);
+extern void ExecHashTableReset(HashJoinTable hashtable, int ntuples);
-#endif /* NODEHASH_H */
+#endif /* NODEHASH_H */
diff --git a/src/include/executor/nodeHashjoin.h b/src/include/executor/nodeHashjoin.h
index 62f02c976c6..17d88862432 100644
--- a/src/include/executor/nodeHashjoin.h
+++ b/src/include/executor/nodeHashjoin.h
@@ -1,28 +1,29 @@
/*-------------------------------------------------------------------------
*
* nodeHashjoin.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeHashjoin.h,v 1.2 1997/08/19 21:38:22 momjian Exp $
+ * $Id: nodeHashjoin.h,v 1.3 1997/09/07 04:57:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODEHASHJOIN_H
-#define NODEHASHJOIN_H
+#ifndef NODEHASHJOIN_H
+#define NODEHASHJOIN_H
-extern TupleTableSlot *ExecHashJoin(HashJoin *node);
+extern TupleTableSlot *ExecHashJoin(HashJoin * node);
-extern bool ExecInitHashJoin(HashJoin *node, EState *estate, Plan *parent);
+extern bool ExecInitHashJoin(HashJoin * node, EState * estate, Plan * parent);
-extern int ExecCountSlotsHashJoin(HashJoin *node);
+extern int ExecCountSlotsHashJoin(HashJoin * node);
-extern void ExecEndHashJoin(HashJoin *node);
+extern void ExecEndHashJoin(HashJoin * node);
-extern char *ExecHashJoinSaveTuple(HeapTuple heapTuple, char *buffer,
- File file, char *position);
+extern char *
+ExecHashJoinSaveTuple(HeapTuple heapTuple, char *buffer,
+ File file, char *position);
-#endif /* NODEHASHJOIN_H */
+#endif /* NODEHASHJOIN_H */
diff --git a/src/include/executor/nodeIndexscan.h b/src/include/executor/nodeIndexscan.h
index 5e55948ad91..e111f7ed2ee 100644
--- a/src/include/executor/nodeIndexscan.h
+++ b/src/include/executor/nodeIndexscan.h
@@ -1,33 +1,34 @@
/*-------------------------------------------------------------------------
*
* nodeIndexscan.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeIndexscan.h,v 1.2 1996/10/23 07:41:34 scrappy Exp $
+ * $Id: nodeIndexscan.h,v 1.3 1997/09/07 04:57:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODEINDEXSCAN_H
-#define NODEINDEXSCAN_H
+#ifndef NODEINDEXSCAN_H
+#define NODEINDEXSCAN_H
+
+extern TupleTableSlot *ExecIndexScan(IndexScan * node);
-extern TupleTableSlot *ExecIndexScan(IndexScan *node);
+extern void ExecIndexReScan(IndexScan * node, ExprContext * exprCtxt, Plan * parent);
-extern void ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent);
+extern void ExecEndIndexScan(IndexScan * node);
-extern void ExecEndIndexScan(IndexScan *node);
+extern void ExecIndexMarkPos(IndexScan * node);
-extern void ExecIndexMarkPos(IndexScan *node);
+extern void ExecIndexRestrPos(IndexScan * node);
-extern void ExecIndexRestrPos(IndexScan *node);
+extern void ExecUpdateIndexScanKeys(IndexScan * node, ExprContext * econtext);
-extern void ExecUpdateIndexScanKeys(IndexScan *node, ExprContext *econtext);
+extern bool ExecInitIndexScan(IndexScan * node, EState * estate, Plan * parent);
-extern bool ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent);
+extern int ExecCountSlotsIndexScan(IndexScan * node);
-extern int ExecCountSlotsIndexScan(IndexScan *node);
+extern void ExecIndexReScan(IndexScan * node, ExprContext * exprCtxt, Plan * parent);
-extern void ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan* parent);
-#endif /* NODEINDEXSCAN_H */
+#endif /* NODEINDEXSCAN_H */
diff --git a/src/include/executor/nodeMaterial.h b/src/include/executor/nodeMaterial.h
index 3560315c533..c1833b11594 100644
--- a/src/include/executor/nodeMaterial.h
+++ b/src/include/executor/nodeMaterial.h
@@ -1,23 +1,23 @@
/*-------------------------------------------------------------------------
*
* nodeMaterial.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeMaterial.h,v 1.1 1996/08/28 07:22:21 scrappy Exp $
+ * $Id: nodeMaterial.h,v 1.2 1997/09/07 04:57:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODEMATERIAL_H
-#define NODEMATERIAL_H
+#ifndef NODEMATERIAL_H
+#define NODEMATERIAL_H
-extern TupleTableSlot *ExecMaterial(Material *node);
-extern bool ExecInitMaterial(Material *node, EState *estate, Plan *parent);
-extern int ExecCountSlotsMaterial(Material *node);
-extern void ExecEndMaterial(Material *node);
-extern List ExecMaterialMarkPos(Material *node);
-extern void ExecMaterialRestrPos(Material *node);
+extern TupleTableSlot *ExecMaterial(Material * node);
+extern bool ExecInitMaterial(Material * node, EState * estate, Plan * parent);
+extern int ExecCountSlotsMaterial(Material * node);
+extern void ExecEndMaterial(Material * node);
+extern List ExecMaterialMarkPos(Material * node);
+extern void ExecMaterialRestrPos(Material * node);
-#endif /* NODEMATERIAL_H */
+#endif /* NODEMATERIAL_H */
diff --git a/src/include/executor/nodeMergejoin.h b/src/include/executor/nodeMergejoin.h
index 3b96ac50c5c..7e496734b44 100644
--- a/src/include/executor/nodeMergejoin.h
+++ b/src/include/executor/nodeMergejoin.h
@@ -1,24 +1,24 @@
/*-------------------------------------------------------------------------
*
* nodeMergejoin.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeMergejoin.h,v 1.3 1997/08/19 21:38:22 momjian Exp $
+ * $Id: nodeMergejoin.h,v 1.4 1997/09/07 04:57:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODEMERGEJOIN_H
-#define NODEMERGEJOIN_H
+#ifndef NODEMERGEJOIN_H
+#define NODEMERGEJOIN_H
-extern TupleTableSlot *ExecMergeJoin(MergeJoin *node);
+extern TupleTableSlot *ExecMergeJoin(MergeJoin * node);
-extern bool ExecInitMergeJoin(MergeJoin *node, EState *estate, Plan *parent);
+extern bool ExecInitMergeJoin(MergeJoin * node, EState * estate, Plan * parent);
-extern int ExecCountSlotsMergeJoin(MergeJoin *node);
+extern int ExecCountSlotsMergeJoin(MergeJoin * node);
-extern void ExecEndMergeJoin(MergeJoin *node);
+extern void ExecEndMergeJoin(MergeJoin * node);
-#endif /* NODEMERGEJOIN_H; */
+#endif /* NODEMERGEJOIN_H; */
diff --git a/src/include/executor/nodeNestloop.h b/src/include/executor/nodeNestloop.h
index 1fe271c0702..8b387841e60 100644
--- a/src/include/executor/nodeNestloop.h
+++ b/src/include/executor/nodeNestloop.h
@@ -1,21 +1,21 @@
/*-------------------------------------------------------------------------
*
* nodeNestloop.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeNestloop.h,v 1.1 1996/08/28 07:22:23 scrappy Exp $
+ * $Id: nodeNestloop.h,v 1.2 1997/09/07 04:57:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODENESTLOOP_H
-#define NODENESTLOOP_H
+#ifndef NODENESTLOOP_H
+#define NODENESTLOOP_H
-extern TupleTableSlot *ExecNestLoop(NestLoop *node, Plan *parent);
-extern bool ExecInitNestLoop(NestLoop *node, EState *estate, Plan *parent);
-extern int ExecCountSlotsNestLoop(NestLoop *node);
-extern void ExecEndNestLoop(NestLoop *node);
+extern TupleTableSlot *ExecNestLoop(NestLoop * node, Plan * parent);
+extern bool ExecInitNestLoop(NestLoop * node, EState * estate, Plan * parent);
+extern int ExecCountSlotsNestLoop(NestLoop * node);
+extern void ExecEndNestLoop(NestLoop * node);
-#endif /* NODENESTLOOP_H */
+#endif /* NODENESTLOOP_H */
diff --git a/src/include/executor/nodeResult.h b/src/include/executor/nodeResult.h
index ba100ffa54c..40ef4a7b4da 100644
--- a/src/include/executor/nodeResult.h
+++ b/src/include/executor/nodeResult.h
@@ -1,21 +1,21 @@
/*-------------------------------------------------------------------------
*
* nodeResult.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeResult.h,v 1.1 1996/08/28 07:22:24 scrappy Exp $
+ * $Id: nodeResult.h,v 1.2 1997/09/07 04:57:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODERESULT_H
-#define NODERESULT_H
+#ifndef NODERESULT_H
+#define NODERESULT_H
-extern TupleTableSlot *ExecResult(Result *node);
-extern bool ExecInitResult(Result *node, EState *estate, Plan *parent);
-extern int ExecCountSlotsResult(Result *node);
-extern void ExecEndResult(Result *node);
+extern TupleTableSlot *ExecResult(Result * node);
+extern bool ExecInitResult(Result * node, EState * estate, Plan * parent);
+extern int ExecCountSlotsResult(Result * node);
+extern void ExecEndResult(Result * node);
-#endif /* NODERESULT_H */
+#endif /* NODERESULT_H */
diff --git a/src/include/executor/nodeSeqscan.h b/src/include/executor/nodeSeqscan.h
index 99cb83e431c..56237dc80d4 100644
--- a/src/include/executor/nodeSeqscan.h
+++ b/src/include/executor/nodeSeqscan.h
@@ -1,24 +1,24 @@
/*-------------------------------------------------------------------------
*
* nodeSeqscan.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeSeqscan.h,v 1.2 1997/08/19 21:38:23 momjian Exp $
+ * $Id: nodeSeqscan.h,v 1.3 1997/09/07 04:57:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODESEQSCAN_H
-#define NODESEQSCAN_H
+#ifndef NODESEQSCAN_H
+#define NODESEQSCAN_H
-extern TupleTableSlot *ExecSeqScan(SeqScan *node);
-extern bool ExecInitSeqScan(SeqScan *node, EState *estate, Plan *parent);
-extern int ExecCountSlotsSeqScan(SeqScan *node);
-extern void ExecEndSeqScan(SeqScan *node);
-extern void ExecSeqReScan(SeqScan *node, ExprContext *exprCtxt, Plan* parent);
-extern void ExecSeqMarkPos(SeqScan *node);
-extern void ExecSeqRestrPos(SeqScan *node);
+extern TupleTableSlot *ExecSeqScan(SeqScan * node);
+extern bool ExecInitSeqScan(SeqScan * node, EState * estate, Plan * parent);
+extern int ExecCountSlotsSeqScan(SeqScan * node);
+extern void ExecEndSeqScan(SeqScan * node);
+extern void ExecSeqReScan(SeqScan * node, ExprContext * exprCtxt, Plan * parent);
+extern void ExecSeqMarkPos(SeqScan * node);
+extern void ExecSeqRestrPos(SeqScan * node);
-#endif /* NODESEQSCAN_H */
+#endif /* NODESEQSCAN_H */
diff --git a/src/include/executor/nodeSort.h b/src/include/executor/nodeSort.h
index a95d9dc0522..428805702eb 100644
--- a/src/include/executor/nodeSort.h
+++ b/src/include/executor/nodeSort.h
@@ -1,23 +1,23 @@
/*-------------------------------------------------------------------------
*
* nodeSort.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeSort.h,v 1.1 1996/08/28 07:22:25 scrappy Exp $
+ * $Id: nodeSort.h,v 1.2 1997/09/07 04:58:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODESORT_H
-#define NODESORT_H
+#ifndef NODESORT_H
+#define NODESORT_H
-extern TupleTableSlot *ExecSort(Sort *node);
-extern bool ExecInitSort(Sort *node, EState *estate, Plan *parent);
-extern int ExecCountSlotsSort(Sort *node);
-extern void ExecEndSort(Sort *node);
-extern void ExecSortMarkPos(Sort *node);
-extern void ExecSortRestrPos(Sort *node);
+extern TupleTableSlot *ExecSort(Sort * node);
+extern bool ExecInitSort(Sort * node, EState * estate, Plan * parent);
+extern int ExecCountSlotsSort(Sort * node);
+extern void ExecEndSort(Sort * node);
+extern void ExecSortMarkPos(Sort * node);
+extern void ExecSortRestrPos(Sort * node);
-#endif /* NODESORT_H */
+#endif /* NODESORT_H */
diff --git a/src/include/executor/nodeTee.h b/src/include/executor/nodeTee.h
index d70a5984698..7235030d670 100644
--- a/src/include/executor/nodeTee.h
+++ b/src/include/executor/nodeTee.h
@@ -1,22 +1,22 @@
/*-------------------------------------------------------------------------
*
* nodeTee.h--
- * support functions for a Tee executor node
+ * support functions for a Tee executor node
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeTee.h,v 1.1 1996/08/28 07:22:26 scrappy Exp $
+ * $Id: nodeTee.h,v 1.2 1997/09/07 04:58:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODETEE_H
-#define NODETEE_H
+#ifndef NODETEE_H
+#define NODETEE_H
-extern TupleTableSlot* ExecTee(Tee* node, Plan* parent);
-extern bool ExecInitTee(Tee* node, EState* estate, Plan* parent);
-extern void ExecTeeReScan(Tee *node, ExprContext *exprCtxt, Plan *parent);
-extern void ExecEndTee(Tee* node, Plan* parent);
-extern int ExecCountSlotsTee(Tee* node);
+extern TupleTableSlot *ExecTee(Tee * node, Plan * parent);
+extern bool ExecInitTee(Tee * node, EState * estate, Plan * parent);
+extern void ExecTeeReScan(Tee * node, ExprContext * exprCtxt, Plan * parent);
+extern void ExecEndTee(Tee * node, Plan * parent);
+extern int ExecCountSlotsTee(Tee * node);
-#endif /* NODETEE_H */
+#endif /* NODETEE_H */
diff --git a/src/include/executor/nodeUnique.h b/src/include/executor/nodeUnique.h
index a3c143e3459..c66fa827cab 100644
--- a/src/include/executor/nodeUnique.h
+++ b/src/include/executor/nodeUnique.h
@@ -1,21 +1,21 @@
/*-------------------------------------------------------------------------
*
* nodeUnique.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeUnique.h,v 1.1 1996/08/28 07:22:27 scrappy Exp $
+ * $Id: nodeUnique.h,v 1.2 1997/09/07 04:58:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef NODEUNIQUE_H
-#define NODEUNIQUE_H
+#ifndef NODEUNIQUE_H
+#define NODEUNIQUE_H
-extern TupleTableSlot *ExecUnique(Unique *node);
-extern bool ExecInitUnique(Unique *node, EState *estate, Plan *parent);
-extern int ExecCountSlotsUnique(Unique *node);
-extern void ExecEndUnique(Unique *node);
+extern TupleTableSlot *ExecUnique(Unique * node);
+extern bool ExecInitUnique(Unique * node, EState * estate, Plan * parent);
+extern int ExecCountSlotsUnique(Unique * node);
+extern void ExecEndUnique(Unique * node);
-#endif /* NODEUNIQUE_H */
+#endif /* NODEUNIQUE_H */
diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h
index 8ab7b34b0c8..fee2056f9f8 100644
--- a/src/include/executor/spi.h
+++ b/src/include/executor/spi.h
@@ -1,11 +1,11 @@
/*-------------------------------------------------------------------------
*
* spi.h--
- *
+ *
*
*-------------------------------------------------------------------------
*/
-#ifndef SPI_H
+#ifndef SPI_H
#define SPI_H
#include <string.h>
@@ -34,52 +34,53 @@
#include "executor/executor.h"
#include "executor/execdefs.h"
-typedef struct {
- uint32 alloced; /* # of alloced vals */
- uint32 free; /* # of free vals */
- TupleDesc tupdesc; /* tuple descriptor */
- HeapTuple *vals; /* tuples */
-} SPITupleTable;
+typedef struct
+{
+ uint32 alloced; /* # of alloced vals */
+ uint32 free; /* # of free vals */
+ TupleDesc tupdesc; /* tuple descriptor */
+ HeapTuple *vals; /* tuples */
+} SPITupleTable;
-#define SPI_ERROR_CONNECT -1
-#define SPI_ERROR_COPY -2
-#define SPI_ERROR_OPUNKNOWN -3
+#define SPI_ERROR_CONNECT -1
+#define SPI_ERROR_COPY -2
+#define SPI_ERROR_OPUNKNOWN -3
#define SPI_ERROR_UNCONNECTED -4
-#define SPI_ERROR_CURSOR -5
-#define SPI_ERROR_ARGUMENT -6
-#define SPI_ERROR_PARAM -7
+#define SPI_ERROR_CURSOR -5
+#define SPI_ERROR_ARGUMENT -6
+#define SPI_ERROR_PARAM -7
#define SPI_ERROR_TRANSACTION -8
#define SPI_ERROR_NOATTRIBUTE -9
-#define SPI_ERROR_NOOUTFUNC -10
+#define SPI_ERROR_NOOUTFUNC -10
#define SPI_ERROR_TYPUNKNOWN -11
-#define SPI_OK_CONNECT 1
-#define SPI_OK_FINISH 2
-#define SPI_OK_FETCH 3
-#define SPI_OK_UTILITY 4
-#define SPI_OK_SELECT 5
-#define SPI_OK_SELINTO 6
-#define SPI_OK_INSERT 7
-#define SPI_OK_DELETE 8
-#define SPI_OK_UPDATE 9
-#define SPI_OK_CURSOR 10
+#define SPI_OK_CONNECT 1
+#define SPI_OK_FINISH 2
+#define SPI_OK_FETCH 3
+#define SPI_OK_UTILITY 4
+#define SPI_OK_SELECT 5
+#define SPI_OK_SELINTO 6
+#define SPI_OK_INSERT 7
+#define SPI_OK_DELETE 8
+#define SPI_OK_UPDATE 9
+#define SPI_OK_CURSOR 10
-extern uint32 SPI_processed;
+extern uint32 SPI_processed;
extern SPITupleTable *SPI_tuptable;
-extern int SPI_result;
+extern int SPI_result;
-extern int SPI_connect (void);
-extern int SPI_finish (void);
-extern int SPI_exec (char *src, int tcount);
-extern int SPI_execp (void *plan, char **values, char *Nulls, int tcount);
-extern void *SPI_prepare (char *src, int nargs, Oid *argtypes);
-extern void *SPI_saveplan (void *plan);
+extern int SPI_connect(void);
+extern int SPI_finish(void);
+extern int SPI_exec(char *src, int tcount);
+extern int SPI_execp(void *plan, char **values, char *Nulls, int tcount);
+extern void *SPI_prepare(char *src, int nargs, Oid * argtypes);
+extern void *SPI_saveplan(void *plan);
-extern int SPI_fnumber (TupleDesc tupdesc, char *fname);
-extern char *SPI_getvalue (HeapTuple tuple, TupleDesc tupdesc, int fnumber);
-extern char *SPI_getbinval (HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool *isnull);
-extern char *SPI_gettype (TupleDesc tupdesc, int fnumber);
-extern Oid SPI_gettypeid (TupleDesc tupdesc, int fnumber);
-extern char *SPI_getrelname (Relation rel);
+extern int SPI_fnumber(TupleDesc tupdesc, char *fname);
+extern char *SPI_getvalue(HeapTuple tuple, TupleDesc tupdesc, int fnumber);
+extern char *SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool * isnull);
+extern char *SPI_gettype(TupleDesc tupdesc, int fnumber);
+extern Oid SPI_gettypeid(TupleDesc tupdesc, int fnumber);
+extern char *SPI_getrelname(Relation rel);
-#endif /* SPI_H */
+#endif /* SPI_H */
diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h
index 4357e1240de..fcef30cd8e4 100644
--- a/src/include/executor/tuptable.h
+++ b/src/include/executor/tuptable.h
@@ -1,16 +1,16 @@
/*-------------------------------------------------------------------------
*
* tuptable.h--
- * tuple table support stuff
+ * tuple table support stuff
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tuptable.h,v 1.4 1996/11/04 08:52:47 scrappy Exp $
+ * $Id: tuptable.h,v 1.5 1997/09/07 04:58:03 momjian Exp $
*
* NOTES
- * The tuple table interface is getting pretty ugly.
- * It should be redesigned soon.
+ * The tuple table interface is getting pretty ugly.
+ * It should be redesigned soon.
*
*-------------------------------------------------------------------------
*/
@@ -22,55 +22,57 @@
#include <access/htup.h>
/* ----------------
- * Note: the executor tuple table is managed and manipulated by special
- * code and macros in executor/execTuples.c and tupTable.h
+ * Note: the executor tuple table is managed and manipulated by special
+ * code and macros in executor/execTuples.c and tupTable.h
*
- * TupleTableSlot information
+ * TupleTableSlot information
*
- * shouldFree boolean - should we call pfree() on tuple
- * descIsNew boolean - true when tupleDescriptor changes
- * tupleDescriptor type information kept regarding the tuple data
- * buffer the buffer for tuples pointing to disk pages
+ * shouldFree boolean - should we call pfree() on tuple
+ * descIsNew boolean - true when tupleDescriptor changes
+ * tupleDescriptor type information kept regarding the tuple data
+ * buffer the buffer for tuples pointing to disk pages
*
- * The executor stores pointers to tuples in a ``tuple table''
- * which is composed of TupleTableSlot's. Some of the tuples
- * are pointers to buffer pages and others are pointers to
- * palloc'ed memory and the shouldFree variable tells us when
- * we may call pfree() on a tuple. -cim 9/23/90
+ * The executor stores pointers to tuples in a ``tuple table''
+ * which is composed of TupleTableSlot's. Some of the tuples
+ * are pointers to buffer pages and others are pointers to
+ * palloc'ed memory and the shouldFree variable tells us when
+ * we may call pfree() on a tuple. -cim 9/23/90
*
- * In the implementation of nested-dot queries such as
- * "retrieve (EMP.hobbies.all)", a single scan may return tuples
- * of many types, so now we return pointers to tuple descriptors
- * along with tuples returned via the tuple table. -cim 1/18/90
+ * In the implementation of nested-dot queries such as
+ * "retrieve (EMP.hobbies.all)", a single scan may return tuples
+ * of many types, so now we return pointers to tuple descriptors
+ * along with tuples returned via the tuple table. -cim 1/18/90
* ----------------
*/
-typedef struct TupleTableSlot {
- NodeTag type;
- HeapTuple val;
- bool ttc_shouldFree;
- bool ttc_descIsNew;
- TupleDesc ttc_tupleDescriptor;
- Buffer ttc_buffer;
- int ttc_whichplan;
-} TupleTableSlot;
+typedef struct TupleTableSlot
+{
+ NodeTag type;
+ HeapTuple val;
+ bool ttc_shouldFree;
+ bool ttc_descIsNew;
+ TupleDesc ttc_tupleDescriptor;
+ Buffer ttc_buffer;
+ int ttc_whichplan;
+} TupleTableSlot;
/* ----------------
- * tuple table data structure
+ * tuple table data structure
* ----------------
*/
-typedef struct TupleTableData {
- int size; /* size of the table */
- int next; /* next available slot number */
- TupleTableSlot *array; /* array of TupleTableSlot's */
-} TupleTableData;
+typedef struct TupleTableData
+{
+ int size; /* size of the table */
+ int next; /* next available slot number */
+ TupleTableSlot *array; /* array of TupleTableSlot's */
+} TupleTableData;
typedef TupleTableData *TupleTable;
-/*
+/*
tuple table macros are all excised from the system now
see executor.h for decls of functions defined in execTuples.c
- jolly
*/
-#endif /* TUPTABLE_H */
+#endif /* TUPTABLE_H */