summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorBruce Momjian1997-09-08 02:41:22 +0000
committerBruce Momjian1997-09-08 02:41:22 +0000
commit319dbfa7364721d3343af03a7ce063c2a2c9d385 (patch)
treea2146fe02c49ce1e497b7c287dfcaa367a703ae4 /src/include/nodes
parenta90f12fd9d6886da4f0734288496361a304d3882 (diff)
Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/execnodes.h244
-rw-r--r--src/include/nodes/makefuncs.h10
-rw-r--r--src/include/nodes/memnodes.h40
-rw-r--r--src/include/nodes/nodeFuncs.h12
-rw-r--r--src/include/nodes/nodes.h24
-rw-r--r--src/include/nodes/params.h20
-rw-r--r--src/include/nodes/parsenodes.h730
-rw-r--r--src/include/nodes/pg_list.h88
-rw-r--r--src/include/nodes/plannodes.h207
-rw-r--r--src/include/nodes/primnodes.h174
-rw-r--r--src/include/nodes/print.h18
-rw-r--r--src/include/nodes/readfuncs.h8
-rw-r--r--src/include/nodes/relation.h234
13 files changed, 903 insertions, 906 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 870bdd80186..f8ad7675a5e 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execnodes.h,v 1.9 1997/09/07 04:58:29 momjian Exp $
+ * $Id: execnodes.h,v 1.10 1997/09/08 02:37:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,12 +35,12 @@
*/
typedef struct IndexInfo
{
- NodeTag type;
- int ii_NumKeyAttributes;
- AttrNumber *ii_KeyAttributeNumbers;
+ NodeTag type;
+ int ii_NumKeyAttributes;
+ AttrNumber *ii_KeyAttributeNumbers;
FuncIndexInfoPtr ii_FuncIndexInfo;
- Node *ii_Predicate;
-} IndexInfo;
+ Node *ii_Predicate;
+} IndexInfo;
/* ----------------
* RelationInfo information
@@ -59,13 +59,13 @@ typedef struct IndexInfo
*/
typedef struct RelationInfo
{
- NodeTag type;
- Index ri_RangeTableIndex;
- Relation ri_RelationDesc;
- int ri_NumIndices;
- RelationPtr ri_IndexRelationDescs;
- IndexInfo **ri_IndexRelationInfo;
-} RelationInfo;
+ NodeTag type;
+ Index ri_RangeTableIndex;
+ Relation ri_RelationDesc;
+ int ri_NumIndices;
+ RelationPtr ri_IndexRelationDescs;
+ IndexInfo **ri_IndexRelationInfo;
+} RelationInfo;
/* ----------------
* ExprContext
@@ -80,17 +80,17 @@ typedef struct RelationInfo
*/
typedef struct ExprContext
{
- NodeTag type;
+ NodeTag type;
TupleTableSlot *ecxt_scantuple;
TupleTableSlot *ecxt_innertuple;
TupleTableSlot *ecxt_outertuple;
- Relation ecxt_relation;
- Index ecxt_relid;
- ParamListInfo ecxt_param_list_info;
- List *ecxt_range_table;
- Datum *ecxt_values;/* precomputed values for aggreg */
- char *ecxt_nulls; /* null flags for aggreg values */
-} ExprContext;
+ Relation ecxt_relation;
+ Index ecxt_relid;
+ ParamListInfo ecxt_param_list_info;
+ List *ecxt_range_table;
+ Datum *ecxt_values; /* precomputed values for aggreg */
+ char *ecxt_nulls; /* null flags for aggreg values */
+} ExprContext;
/* ----------------
* ProjectionInfo node information
@@ -110,13 +110,13 @@ typedef struct ExprContext
*/
typedef struct ProjectionInfo
{
- NodeTag type;
- List *pi_targetlist;
- int pi_len;
- Datum *pi_tupValue;
- ExprContext *pi_exprContext;
+ NodeTag type;
+ List *pi_targetlist;
+ int pi_len;
+ Datum *pi_tupValue;
+ ExprContext *pi_exprContext;
TupleTableSlot *pi_slot;
-} ProjectionInfo;
+} ProjectionInfo;
/* ----------------
* JunkFilter
@@ -149,15 +149,15 @@ typedef struct ProjectionInfo
*/
typedef struct JunkFilter
{
- NodeTag type;
- List *jf_targetList;
- int jf_length;
- TupleDesc jf_tupType;
- List *jf_cleanTargetList;
- int jf_cleanLength;
- TupleDesc jf_cleanTupType;
- AttrNumber *jf_cleanMap;
-} JunkFilter;
+ NodeTag type;
+ List *jf_targetList;
+ int jf_length;
+ TupleDesc jf_tupType;
+ List *jf_cleanTargetList;
+ int jf_cleanLength;
+ TupleDesc jf_cleanTupType;
+ AttrNumber *jf_cleanMap;
+} JunkFilter;
/* ----------------
* EState information
@@ -193,19 +193,19 @@ typedef struct JunkFilter
*/
typedef struct EState
{
- NodeTag type;
- ScanDirection es_direction;
- List *es_range_table;
- RelationInfo *es_result_relation_info;
- Relation es_into_relation_descriptor;
- ParamListInfo es_param_list_info;
- int es_BaseId;
- TupleTable es_tupleTable;
- JunkFilter *es_junkFilter;
- int *es_refcount;
- uint32 es_processed; /* # of tuples processed */
- Oid es_lastoid; /* last oid processed (by INSERT) */
-} EState;
+ NodeTag type;
+ ScanDirection es_direction;
+ List *es_range_table;
+ RelationInfo *es_result_relation_info;
+ Relation es_into_relation_descriptor;
+ ParamListInfo es_param_list_info;
+ int es_BaseId;
+ TupleTable es_tupleTable;
+ JunkFilter *es_junkFilter;
+ int *es_refcount;
+ uint32 es_processed; /* # of tuples processed */
+ Oid es_lastoid; /* last oid processed (by INSERT) */
+} EState;
/* ----------------
* Executor Type information needed by plannodes.h
@@ -258,14 +258,14 @@ typedef struct EState
*/
typedef struct CommonState
{
- NodeTag type; /* its first field is NodeTag */
- int cs_base_id;
+ NodeTag type; /* its first field is NodeTag */
+ int cs_base_id;
TupleTableSlot *cs_OuterTupleSlot;
TupleTableSlot *cs_ResultTupleSlot;
- ExprContext *cs_ExprContext;
+ ExprContext *cs_ExprContext;
ProjectionInfo *cs_ProjInfo;
- bool cs_TupFromTlist;
-} CommonState;
+ bool cs_TupFromTlist;
+} CommonState;
/* ----------------------------------------------------------------
@@ -291,9 +291,9 @@ typedef struct CommonState
*/
typedef struct ResultState
{
- CommonState cstate; /* its first field is NodeTag */
- int rs_done;
-} ResultState;
+ CommonState cstate; /* its first field is NodeTag */
+ int rs_done;
+} ResultState;
/* ----------------
* AppendState information
@@ -321,14 +321,14 @@ typedef struct ResultState
*/
typedef struct AppendState
{
- CommonState cstate; /* its first field is NodeTag */
- int as_whichplan;
- int as_nplans;
- bool *as_initialized;
- List *as_rtentries;
- List *as_result_relation_info_list;
- List *as_junkFilter_list;
-} AppendState;
+ CommonState cstate; /* its first field is NodeTag */
+ int as_whichplan;
+ int as_nplans;
+ bool *as_initialized;
+ List *as_rtentries;
+ List *as_result_relation_info_list;
+ List *as_junkFilter_list;
+} AppendState;
/* ----------------------------------------------------------------
* Scan State Information
@@ -358,11 +358,11 @@ typedef struct AppendState
*/
typedef struct CommonScanState
{
- CommonState cstate; /* its first field is NodeTag */
- Relation css_currentRelation;
- HeapScanDesc css_currentScanDesc;
+ CommonState cstate; /* its first field is NodeTag */
+ Relation css_currentRelation;
+ HeapScanDesc css_currentScanDesc;
TupleTableSlot *css_ScanTupleSlot;
-} CommonScanState;
+} CommonScanState;
/* ----------------
* IndexScanState information
@@ -392,15 +392,15 @@ typedef struct CommonScanState
*/
typedef struct IndexScanState
{
- CommonState cstate; /* its first field is NodeTag */
- int iss_NumIndices;
- int iss_IndexPtr;
- ScanKey *iss_ScanKeys;
- int *iss_NumScanKeys;
- Pointer iss_RuntimeKeyInfo;
- RelationPtr iss_RelationDescs;
+ CommonState cstate; /* its first field is NodeTag */
+ int iss_NumIndices;
+ int iss_IndexPtr;
+ ScanKey *iss_ScanKeys;
+ int *iss_NumScanKeys;
+ Pointer iss_RuntimeKeyInfo;
+ RelationPtr iss_RelationDescs;
IndexScanDescPtr iss_ScanDescs;
-} IndexScanState;
+} IndexScanState;
/* ----------------------------------------------------------------
@@ -442,9 +442,9 @@ typedef CommonState JoinState;
*/
typedef struct NestLoopState
{
- JoinState jstate; /* its first field is NodeTag */
- bool nl_PortalFlag;
-} NestLoopState;
+ JoinState jstate; /* its first field is NodeTag */
+ bool nl_PortalFlag;
+} NestLoopState;
/* ----------------
* MergeJoinState information
@@ -468,12 +468,12 @@ typedef struct NestLoopState
*/
typedef struct MergeJoinState
{
- JoinState jstate; /* its first field is NodeTag */
- List *mj_OSortopI;
- List *mj_ISortopO;
- int mj_JoinState;
+ JoinState jstate; /* its first field is NodeTag */
+ List *mj_OSortopI;
+ List *mj_ISortopO;
+ int mj_JoinState;
TupleTableSlot *mj_MarkedTupleSlot;
-} MergeJoinState;
+} MergeJoinState;
/* ----------------
* HashJoinState information
@@ -510,20 +510,20 @@ typedef struct MergeJoinState
*/
typedef struct HashJoinState
{
- JoinState jstate; /* its first field is NodeTag */
- HashJoinTable hj_HashTable;
- IpcMemoryId hj_HashTableShmId;
- HashBucket hj_CurBucket;
- HeapTuple hj_CurTuple;
- OverflowTuple hj_CurOTuple;
- Var *hj_InnerHashKey;
- File *hj_OuterBatches;
- File *hj_InnerBatches;
- char *hj_OuterReadPos;
- int hj_OuterReadBlk;
+ JoinState jstate; /* its first field is NodeTag */
+ HashJoinTable hj_HashTable;
+ IpcMemoryId hj_HashTableShmId;
+ HashBucket hj_CurBucket;
+ HeapTuple hj_CurTuple;
+ OverflowTuple hj_CurOTuple;
+ Var *hj_InnerHashKey;
+ File *hj_OuterBatches;
+ File *hj_InnerBatches;
+ char *hj_OuterReadPos;
+ int hj_OuterReadBlk;
TupleTableSlot *hj_OuterTupleSlot;
TupleTableSlot *hj_HashTupleSlot;
-} HashJoinState;
+} HashJoinState;
/* ----------------------------------------------------------------
@@ -560,9 +560,9 @@ typedef struct HashJoinState
typedef struct MaterialState
{
CommonScanState csstate; /* its first field is NodeTag */
- bool mat_Flag;
- Relation mat_TempRelation;
-} MaterialState;
+ bool mat_Flag;
+ Relation mat_TempRelation;
+} MaterialState;
/* ---------------------
* AggregateState information
@@ -573,8 +573,8 @@ typedef struct MaterialState
typedef struct AggState
{
CommonScanState csstate; /* its first field is NodeTag */
- bool agg_done;
-} AggState;
+ bool agg_done;
+} AggState;
/* ---------------------
* GroupState information
@@ -584,10 +584,10 @@ typedef struct AggState
typedef struct GroupState
{
CommonScanState csstate; /* its first field is NodeTag */
- bool grp_useLastTuple; /* last tuple not processed yet */
- bool grp_done;
+ bool grp_useLastTuple; /* last tuple not processed yet */
+ bool grp_done;
TupleTableSlot *grp_lastSlot;
-} GroupState;
+} GroupState;
/* ----------------
* SortState information
@@ -623,10 +623,10 @@ typedef struct GroupState
typedef struct SortState
{
CommonScanState csstate; /* its first field is NodeTag */
- bool sort_Flag;
- ScanKey sort_Keys;
- bool cleaned;
-} SortState;
+ bool sort_Flag;
+ ScanKey sort_Keys;
+ bool cleaned;
+} SortState;
/* ----------------
* UniqueState information
@@ -668,9 +668,9 @@ typedef CommonState UniqueState;
*/
typedef struct HashState
{
- CommonState cstate; /* its first field is NodeTag */
- File *hashBatches;
-} HashState;
+ CommonState cstate; /* its first field is NodeTag */
+ File *hashBatches;
+} HashState;
/* -----------------------
* TeeState information
@@ -688,15 +688,15 @@ typedef struct HashState
*/
typedef struct TeeState
{
- CommonState cstate; /* its first field is NodeTag */
- int tee_leftPlace;
- int tee_rightPlace;
- int tee_lastPlace;
- char *tee_bufferRelname;
- Relation tee_bufferRel;
- MemoryContext tee_mcxt;
- HeapScanDesc tee_leftScanDesc;
- HeapScanDesc tee_rightScanDesc;
-} TeeState;
+ CommonState cstate; /* its first field is NodeTag */
+ int tee_leftPlace;
+ int tee_rightPlace;
+ int tee_lastPlace;
+ char *tee_bufferRelname;
+ Relation tee_bufferRel;
+ MemoryContext tee_mcxt;
+ HeapScanDesc tee_leftScanDesc;
+ HeapScanDesc tee_rightScanDesc;
+} TeeState;
#endif /* EXECNODES_H */
diff --git a/src/include/nodes/makefuncs.h b/src/include/nodes/makefuncs.h
index 04b2c10c442..57583f6773b 100644
--- a/src/include/nodes/makefuncs.h
+++ b/src/include/nodes/makefuncs.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: makefuncs.h,v 1.4 1997/09/07 04:58:32 momjian Exp $
+ * $Id: makefuncs.h,v 1.5 1997/09/08 02:37:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,21 +16,21 @@
#include <nodes/primnodes.h>
#include <utils/fcache.h>
-extern Oper *
+extern Oper *
makeOper(Oid opno,
Oid opid,
Oid opresulttype,
int opsize,
FunctionCachePtr op_fcache);
-extern Var *
+extern Var *
makeVar(Index varno,
AttrNumber varattno,
Oid vartype,
Index varnoold,
AttrNumber varoattno);
-extern Resdom *
+extern Resdom *
makeResdom(AttrNumber resno,
Oid restype,
int reslen,
@@ -39,7 +39,7 @@ makeResdom(AttrNumber resno,
Oid reskeyop,
int resjunk);
-extern Const *
+extern Const *
makeConst(Oid consttype,
Size constlen,
Datum constvalue,
diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h
index 1d5bced1f3c..aa1050af16c 100644
--- a/src/include/nodes/memnodes.h
+++ b/src/include/nodes/memnodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: memnodes.h,v 1.5 1997/09/07 04:58:35 momjian Exp $
+ * $Id: memnodes.h,v 1.6 1997/09/08 02:37:19 momjian Exp $
*
* XXX the typedefs in this file are different from the other ???nodes.h;
* they are pointers to structures instead of the structures themselves.
@@ -49,46 +49,46 @@
typedef struct MemoryContextMethodsData
{
Pointer(*alloc) ();
- void (*free_p) (); /* need to use free as a #define,
- * so can't use free */
- Pointer(*realloc) ();
- char *(*getName) ();
- void (*dump) ();
-} *MemoryContextMethods;
+ void (*free_p) (); /* need to use free as a #define, so can't
+ * use free */
+ Pointer(*realloc) ();
+ char *(*getName) ();
+ void (*dump) ();
+} *MemoryContextMethods;
typedef struct MemoryContext
{
- NodeTag type;
+ NodeTag type;
MemoryContextMethods method;
-} *MemoryContext;
+} *MemoryContext;
/* think about doing this right some time but we'll have explicit fields
for now -ay 10/94 */
typedef struct GlobalMemory
{
- NodeTag type;
+ NodeTag type;
MemoryContextMethods method;
- AllocSetData setData;
- char *name;
+ AllocSetData setData;
+ char *name;
OrderedElemData elemData;
-} *GlobalMemory;
+} *GlobalMemory;
typedef MemoryContext *PortalMemoryContext;
typedef struct PortalVariableMemory
{
- NodeTag type;
+ NodeTag type;
MemoryContextMethods method;
- AllocSetData setData;
-} *PortalVariableMemory;
+ AllocSetData setData;
+} *PortalVariableMemory;
typedef struct PortalHeapMemory
{
- NodeTag type;
+ NodeTag type;
MemoryContextMethods method;
- Pointer block;
- FixedStackData stackData;
-} *PortalHeapMemory;
+ Pointer block;
+ FixedStackData stackData;
+} *PortalHeapMemory;
/*
* MemoryContextIsValid --
diff --git a/src/include/nodes/nodeFuncs.h b/src/include/nodes/nodeFuncs.h
index 3edc598a833..b1fe7469610 100644
--- a/src/include/nodes/nodeFuncs.h
+++ b/src/include/nodes/nodeFuncs.h
@@ -6,17 +6,17 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeFuncs.h,v 1.3 1997/09/07 04:58:37 momjian Exp $
+ * $Id: nodeFuncs.h,v 1.4 1997/09/08 02:37:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEFUNCS_H
#define NODEFUNCS_H
-extern bool single_node(Node * node);
-extern bool var_is_outer(Var * var);
-extern bool var_is_rel(Var * var);
-extern Oper *replace_opid(Oper * oper);
-extern bool non_null(Expr * c);
+extern bool single_node(Node * node);
+extern bool var_is_outer(Var * var);
+extern bool var_is_rel(Var * var);
+extern Oper *replace_opid(Oper * oper);
+extern bool non_null(Expr * c);
#endif /* NODEFUNCS_H */
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 944ed7453f2..73c7b84cba9 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.12 1997/09/07 04:58:39 momjian Exp $
+ * $Id: nodes.h,v 1.13 1997/09/08 02:37:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -209,7 +209,7 @@ typedef enum NodeTag
T_SortClause,
T_GroupClause,
T_SubSelect
-} NodeTag;
+} NodeTag;
/*
* The first field of a node of any type is gauranteed to be the NodeTag.
@@ -219,8 +219,8 @@ typedef enum NodeTag
*/
typedef struct Node
{
- NodeTag type;
-} Node;
+ NodeTag type;
+} Node;
#define nodeTag(_node_) ((Node*)_node_)->type
@@ -253,30 +253,30 @@ typedef struct Node
/*
* nodes/nodes.c
*/
-extern Node *newNode(Size size, NodeTag tag);
+extern Node *newNode(Size size, NodeTag tag);
/*
* nodes/{outfuncs.c,print.c}
*/
#define nodeDisplay pprint
-extern char *nodeToString(void *obj);
-extern void print(void *obj);
+extern char *nodeToString(void *obj);
+extern void print(void *obj);
/*
* nodes/{readfuncs.c,read.c}
*/
-extern void *stringToNode(char *str);
+extern void *stringToNode(char *str);
/*
* nodes/copyfuncs.c
*/
-extern void *copyObject(void *obj);
+extern void *copyObject(void *obj);
/*
* nodes/equalfuncs.c
*/
-extern bool equal(void *a, void *b);
+extern bool equal(void *a, void *b);
/* ----------------
@@ -284,7 +284,7 @@ extern bool equal(void *a, void *b);
* -cim 6/3/90
* ----------------
*/
-typedef float Cost;
+typedef float Cost;
/*
* CmdType -
@@ -303,7 +303,7 @@ typedef enum CmdType
CMD_NOTIFY,
CMD_UTILITY /* cmds like create, destroy, copy,
* vacuum, etc. */
-} CmdType;
+} CmdType;
#endif /* NODES_H */
diff --git a/src/include/nodes/params.h b/src/include/nodes/params.h
index 78f0d1cd64b..d3e8bd86e8a 100644
--- a/src/include/nodes/params.h
+++ b/src/include/nodes/params.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: params.h,v 1.4 1997/09/07 04:58:40 momjian Exp $
+ * $Id: params.h,v 1.5 1997/09/08 02:37:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -75,15 +75,15 @@
typedef struct ParamListInfoData
{
- int kind;
- char *name;
- AttrNumber id;
- Oid type;
- Size length;
- bool isnull;
- bool byval;
- Datum value;
-} ParamListInfoData;
+ int kind;
+ char *name;
+ AttrNumber id;
+ Oid type;
+ Size length;
+ bool isnull;
+ bool byval;
+ Datum value;
+} ParamListInfoData;
typedef ParamListInfoData *ParamListInfo;
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index c24d27918c2..aa311129159 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.24 1997/09/07 04:58:44 momjian Exp $
+ * $Id: parsenodes.h,v 1.25 1997/09/08 02:37:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,39 +33,38 @@
*/
typedef struct Query
{
- NodeTag type;
+ NodeTag type;
- CmdType commandType;/* select|insert|update|delete|utility */
+ CmdType commandType; /* select|insert|update|delete|utility */
- Node *utilityStmt;/* non-null if this is a non-optimizable
+ Node *utilityStmt; /* non-null if this is a non-optimizable
* statement */
- int resultRelation; /* target relation (index to
- * rtable) */
- char *into; /* portal (cursor) name */
- bool isPortal; /* is this a retrieve into portal? */
- bool isBinary; /* binary portal? */
+ int resultRelation; /* target relation (index to rtable) */
+ char *into; /* portal (cursor) name */
+ bool isPortal; /* is this a retrieve into portal? */
+ bool isBinary; /* binary portal? */
- char *uniqueFlag; /* NULL, '*', or Unique attribute name */
- List *sortClause; /* a list of SortClause's */
+ char *uniqueFlag; /* NULL, '*', or Unique attribute name */
+ List *sortClause; /* a list of SortClause's */
- List *rtable; /* list of range table entries */
- List *targetList; /* target list (of TargetEntry) */
- Node *qual; /* qualifications */
+ List *rtable; /* list of range table entries */
+ List *targetList; /* target list (of TargetEntry) */
+ Node *qual; /* qualifications */
- List *groupClause;/* list of columns to specified in GROUP
+ List *groupClause; /* list of columns to specified in GROUP
* BY */
- Node *havingQual; /* qualification of each group */
+ Node *havingQual; /* qualification of each group */
- int qry_numAgg; /* number of aggregates in the target list */
- Aggreg **qry_aggs; /* the aggregates */
+ int qry_numAgg; /* number of aggregates in the target list */
+ Aggreg **qry_aggs; /* the aggregates */
/* internal to planner */
- List *base_relation_list_; /* base relation list */
- List *join_relation_list_; /* list of relations
- * generated by joins */
- bool query_is_archival_; /* archival query flag */
-} Query;
+ List *base_relation_list_; /* base relation list */
+ List *join_relation_list_; /* list of relations generated by
+ * joins */
+ bool query_is_archival_; /* archival query flag */
+} Query;
/*****************************************************************************
@@ -83,11 +82,11 @@ typedef struct Query
*/
typedef struct AddAttrStmt
{
- NodeTag type;
- char *relname; /* the relation to add attr */
- bool inh; /* add recursively to children? */
+ NodeTag type;
+ char *relname; /* the relation to add attr */
+ bool inh; /* add recursively to children? */
struct ColumnDef *colDef; /* the attribute definition */
-} AddAttrStmt;
+} AddAttrStmt;
/* ----------------------
* Change ACL Statement
@@ -95,11 +94,11 @@ typedef struct AddAttrStmt
*/
typedef struct ChangeACLStmt
{
- NodeTag type;
+ NodeTag type;
struct AclItem *aclitem;
- unsigned modechg;
- List *relNames;
-} ChangeACLStmt;
+ unsigned modechg;
+ List *relNames;
+} ChangeACLStmt;
/* ----------------------
* Close Portal Statement
@@ -107,9 +106,9 @@ typedef struct ChangeACLStmt
*/
typedef struct ClosePortalStmt
{
- NodeTag type;
- char *portalname; /* name of the portal (cursor) */
-} ClosePortalStmt;
+ NodeTag type;
+ char *portalname; /* name of the portal (cursor) */
+} ClosePortalStmt;
/* ----------------------
* Copy Statement
@@ -117,14 +116,14 @@ typedef struct ClosePortalStmt
*/
typedef struct CopyStmt
{
- NodeTag type;
- bool binary; /* is a binary copy? */
- char *relname; /* the relation to copy */
- bool oids; /* copy oid's? */
- int direction; /* TO or FROM */
- char *filename; /* if NULL, use stdin/stdout */
- char *delimiter; /* delimiter character, \t by default */
-} CopyStmt;
+ NodeTag type;
+ bool binary; /* is a binary copy? */
+ char *relname; /* the relation to copy */
+ bool oids; /* copy oid's? */
+ int direction; /* TO or FROM */
+ char *filename; /* if NULL, use stdin/stdout */
+ char *delimiter; /* delimiter character, \t by default */
+} CopyStmt;
/* ----------------------
* Create Table Statement
@@ -133,32 +132,32 @@ typedef struct CopyStmt
typedef enum ArchType
{
ARCH_NONE, ARCH_LIGHT, ARCH_HEAVY /* archive mode */
-} ArchType;
+} ArchType;
typedef struct CreateStmt
{
- NodeTag type;
- char *relname; /* the relation to create */
- List *tableElts; /* column definitions list of ColumnDef */
- List *inhRelnames;/* relations to inherit from list of Value
+ NodeTag type;
+ char *relname; /* the relation to create */
+ List *tableElts; /* column definitions list of ColumnDef */
+ List *inhRelnames; /* relations to inherit from list of Value
* (string) */
- ArchType archiveType;/* archive mode (ARCH_NONE if none */
- int location; /* smgrid (-1 if none) */
- int archiveLoc; /* smgrid (-1 if none) */
- List *constraints;/* list of constraints (ConstaintDef) */
-} CreateStmt;
+ ArchType archiveType; /* archive mode (ARCH_NONE if none */
+ int location; /* smgrid (-1 if none) */
+ int archiveLoc; /* smgrid (-1 if none) */
+ List *constraints; /* list of constraints (ConstaintDef) */
+} CreateStmt;
typedef enum ConstrType
{
CONSTR_NONE, CONSTR_CHECK /* type of constaints */
-} ConstrType;
+} ConstrType;
typedef struct ConstraintDef
{
- ConstrType type;
- char *name; /* name */
- void *def; /* definition */
-} ConstraintDef;
+ ConstrType type;
+ char *name; /* name */
+ void *def; /* definition */
+} ConstraintDef;
/* ----------------------
* Create/Drop TRIGGER Statements
@@ -167,26 +166,26 @@ typedef struct ConstraintDef
typedef struct CreateTrigStmt
{
- NodeTag type;
- char *trigname; /* TRIGGER' name */
- char *relname; /* triggered relation */
- char *funcname; /* function to call (or NULL) */
- List *args; /* list of (T_String) Values or NULL */
- bool before; /* BEFORE/AFTER */
- bool row; /* ROW/STATEMENT */
- char actions[4]; /* Insert, Update, Delete */
- char *lang; /* NULL (which means Clanguage) */
- char *text; /* AS 'text' */
- List *attr; /* UPDATE OF a, b,... (NI) or NULL */
- char *when; /* WHEN 'a > 10 ...' (NI) or NULL */
-} CreateTrigStmt;
+ NodeTag type;
+ char *trigname; /* TRIGGER' name */
+ char *relname; /* triggered relation */
+ char *funcname; /* function to call (or NULL) */
+ List *args; /* list of (T_String) Values or NULL */
+ bool before; /* BEFORE/AFTER */
+ bool row; /* ROW/STATEMENT */
+ char actions[4]; /* Insert, Update, Delete */
+ char *lang; /* NULL (which means Clanguage) */
+ char *text; /* AS 'text' */
+ List *attr; /* UPDATE OF a, b,... (NI) or NULL */
+ char *when; /* WHEN 'a > 10 ...' (NI) or NULL */
+} CreateTrigStmt;
typedef struct DropTrigStmt
{
- NodeTag type;
- char *trigname; /* TRIGGER' name */
- char *relname; /* triggered relation */
-} DropTrigStmt;
+ NodeTag type;
+ char *trigname; /* TRIGGER' name */
+ char *relname; /* triggered relation */
+} DropTrigStmt;
/* ----------------------
* Create SEQUENCE Statement
@@ -195,10 +194,10 @@ typedef struct DropTrigStmt
typedef struct CreateSeqStmt
{
- NodeTag type;
- char *seqname; /* the relation to create */
- List *options;
-} CreateSeqStmt;
+ NodeTag type;
+ char *seqname; /* the relation to create */
+ List *options;
+} CreateSeqStmt;
/* ----------------------
* Create Version Statement
@@ -206,12 +205,12 @@ typedef struct CreateSeqStmt
*/
typedef struct VersionStmt
{
- NodeTag type;
- char *relname; /* the new relation */
- int direction; /* FORWARD | BACKWARD */
- char *fromRelname;/* relation to create a version */
- char *date; /* date of the snapshot */
-} VersionStmt;
+ NodeTag type;
+ char *relname; /* the new relation */
+ int direction; /* FORWARD | BACKWARD */
+ char *fromRelname; /* relation to create a version */
+ char *date; /* date of the snapshot */
+} VersionStmt;
/* ----------------------
* Create {Operator|Type|Aggregate} Statement
@@ -219,11 +218,11 @@ typedef struct VersionStmt
*/
typedef struct DefineStmt
{
- NodeTag type;
- int defType; /* OPERATOR|P_TYPE|AGGREGATE */
- char *defname;
- List *definition; /* a list of DefElem */
-} DefineStmt;
+ NodeTag type;
+ int defType; /* OPERATOR|P_TYPE|AGGREGATE */
+ char *defname;
+ List *definition; /* a list of DefElem */
+} DefineStmt;
/* ----------------------
* Drop Table Statement
@@ -231,10 +230,10 @@ typedef struct DefineStmt
*/
typedef struct DestroyStmt
{
- NodeTag type;
- List *relNames; /* relations to be dropped */
- bool sequence;
-} DestroyStmt;
+ NodeTag type;
+ List *relNames; /* relations to be dropped */
+ bool sequence;
+} DestroyStmt;
/* ----------------------
* Extend Index Statement
@@ -242,12 +241,12 @@ typedef struct DestroyStmt
*/
typedef struct ExtendStmt
{
- NodeTag type;
- char *idxname; /* name of the index */
- Node *whereClause;/* qualifications */
- List *rangetable; /* range table, filled in by
+ NodeTag type;
+ char *idxname; /* name of the index */
+ Node *whereClause; /* qualifications */
+ List *rangetable; /* range table, filled in by
* transformStmt() */
-} ExtendStmt;
+} ExtendStmt;
/* ----------------------
* Begin Recipe Statement
@@ -255,9 +254,9 @@ typedef struct ExtendStmt
*/
typedef struct RecipeStmt
{
- NodeTag type;
- char *recipeName; /* name of the recipe */
-} RecipeStmt;
+ NodeTag type;
+ char *recipeName; /* name of the recipe */
+} RecipeStmt;
/* ----------------------
* Fetch Statement
@@ -265,11 +264,11 @@ typedef struct RecipeStmt
*/
typedef struct FetchStmt
{
- NodeTag type;
- int direction; /* FORWARD or BACKWARD */
- int howMany; /* amount to fetch ("ALL" --> 0) */
- char *portalname; /* name of portal (cursor) */
-} FetchStmt;
+ NodeTag type;
+ int direction; /* FORWARD or BACKWARD */
+ int howMany; /* amount to fetch ("ALL" --> 0) */
+ char *portalname; /* name of portal (cursor) */
+} FetchStmt;
/* ----------------------
* Create Index Statement
@@ -277,19 +276,18 @@ typedef struct FetchStmt
*/
typedef struct IndexStmt
{
- NodeTag type;
- char *idxname; /* name of the index */
- char *relname; /* name of relation to index on */
- char *accessMethod; /* name of acess methood (eg.
- * btree) */
- List *indexParams;/* a list of IndexElem */
- List *withClause; /* a list of ParamString */
- Node *whereClause;/* qualifications */
- List *rangetable; /* range table, filled in by
+ NodeTag type;
+ char *idxname; /* name of the index */
+ char *relname; /* name of relation to index on */
+ char *accessMethod; /* name of acess methood (eg. btree) */
+ List *indexParams; /* a list of IndexElem */
+ List *withClause; /* a list of ParamString */
+ Node *whereClause; /* qualifications */
+ List *rangetable; /* range table, filled in by
* transformStmt() */
- bool *lossy; /* is index lossy? */
- bool unique; /* is index unique? */
-} IndexStmt;
+ bool *lossy; /* is index lossy? */
+ bool unique; /* is index unique? */
+} IndexStmt;
/* ----------------------
* Move Statement (Not implemented)
@@ -297,12 +295,12 @@ typedef struct IndexStmt
*/
typedef struct MoveStmt
{
- NodeTag type;
- int direction; /* FORWARD or BACKWARD */
- bool to;
- int where;
- char *portalname;
-} MoveStmt;
+ NodeTag type;
+ int direction; /* FORWARD or BACKWARD */
+ bool to;
+ int where;
+ char *portalname;
+} MoveStmt;
/* ----------------------
* Create Function Statement
@@ -310,16 +308,16 @@ typedef struct MoveStmt
*/
typedef struct ProcedureStmt
{
- NodeTag type;
- char *funcname; /* name of function to create */
- List *defArgs; /* list of definitions a list of strings
+ NodeTag type;
+ char *funcname; /* name of function to create */
+ List *defArgs; /* list of definitions a list of strings
* (as Value *) */
- Node *returnType; /* the return type (as a string or a
+ Node *returnType; /* the return type (as a string or a
* TypeName (ie.setof) */
- List *withClause; /* a list of ParamString */
- char *as; /* the SQL statement or filename */
- char *language; /* C or SQL */
-} ProcedureStmt;
+ List *withClause; /* a list of ParamString */
+ char *as; /* the SQL statement or filename */
+ char *language; /* C or SQL */
+} ProcedureStmt;
/* ----------------------
* Purge Statement
@@ -327,11 +325,11 @@ typedef struct ProcedureStmt
*/
typedef struct PurgeStmt
{
- NodeTag type;
- char *relname; /* relation to purge */
- char *beforeDate; /* purge before this date */
- char *afterDate; /* purge after this date */
-} PurgeStmt;
+ NodeTag type;
+ char *relname; /* relation to purge */
+ char *beforeDate; /* purge before this date */
+ char *afterDate; /* purge after this date */
+} PurgeStmt;
/* ----------------------
* Drop Aggregate Statement
@@ -339,10 +337,10 @@ typedef struct PurgeStmt
*/
typedef struct RemoveAggrStmt
{
- NodeTag type;
- char *aggname; /* aggregate to drop */
- char *aggtype; /* for this type */
-} RemoveAggrStmt;
+ NodeTag type;
+ char *aggname; /* aggregate to drop */
+ char *aggtype; /* for this type */
+} RemoveAggrStmt;
/* ----------------------
* Drop Function Statement
@@ -350,10 +348,10 @@ typedef struct RemoveAggrStmt
*/
typedef struct RemoveFuncStmt
{
- NodeTag type;
- char *funcname; /* function to drop */
- List *args; /* types of the arguments */
-} RemoveFuncStmt;
+ NodeTag type;
+ char *funcname; /* function to drop */
+ List *args; /* types of the arguments */
+} RemoveFuncStmt;
/* ----------------------
* Drop Operator Statement
@@ -361,10 +359,10 @@ typedef struct RemoveFuncStmt
*/
typedef struct RemoveOperStmt
{
- NodeTag type;
- char *opname; /* operator to drop */
- List *args; /* types of the arguments */
-} RemoveOperStmt;
+ NodeTag type;
+ char *opname; /* operator to drop */
+ List *args; /* types of the arguments */
+} RemoveOperStmt;
/* ----------------------
* Drop {Type|Index|Rule|View} Statement
@@ -372,10 +370,10 @@ typedef struct RemoveOperStmt
*/
typedef struct RemoveStmt
{
- NodeTag type;
- int removeType; /* P_TYPE|INDEX|RULE|VIEW */
- char *name; /* name to drop */
-} RemoveStmt;
+ NodeTag type;
+ int removeType; /* P_TYPE|INDEX|RULE|VIEW */
+ char *name; /* name to drop */
+} RemoveStmt;
/* ----------------------
* Alter Table Statement
@@ -383,14 +381,14 @@ typedef struct RemoveStmt
*/
typedef struct RenameStmt
{
- NodeTag type;
- char *relname; /* relation to be altered */
- bool inh; /* recursively alter children? */
- char *column; /* if NULL, rename the relation name to
+ NodeTag type;
+ char *relname; /* relation to be altered */
+ bool inh; /* recursively alter children? */
+ char *column; /* if NULL, rename the relation name to
* the new name. Otherwise, rename this
* column name. */
- char *newname; /* the new name */
-} RenameStmt;
+ char *newname; /* the new name */
+} RenameStmt;
/* ----------------------
* Create Rule Statement
@@ -398,14 +396,14 @@ typedef struct RenameStmt
*/
typedef struct RuleStmt
{
- NodeTag type;
- char *rulename; /* name of the rule */
- Node *whereClause;/* qualifications */
- CmdType event; /* RETRIEVE */
- struct Attr *object; /* object affected */
- bool instead; /* is a 'do instead'? */
- List *actions; /* the action statements */
-} RuleStmt;
+ NodeTag type;
+ char *rulename; /* name of the rule */
+ Node *whereClause; /* qualifications */
+ CmdType event; /* RETRIEVE */
+ struct Attr *object; /* object affected */
+ bool instead; /* is a 'do instead'? */
+ List *actions; /* the action statements */
+} RuleStmt;
/* ----------------------
* Notify Statement
@@ -413,9 +411,9 @@ typedef struct RuleStmt
*/
typedef struct NotifyStmt
{
- NodeTag type;
- char *relname; /* relation to notify */
-} NotifyStmt;
+ NodeTag type;
+ char *relname; /* relation to notify */
+} NotifyStmt;
/* ----------------------
* Listen Statement
@@ -423,9 +421,9 @@ typedef struct NotifyStmt
*/
typedef struct ListenStmt
{
- NodeTag type;
- char *relname; /* relation to listen on */
-} ListenStmt;
+ NodeTag type;
+ char *relname; /* relation to listen on */
+} ListenStmt;
/* ----------------------
* {Begin|Abort|End} Transaction Statement
@@ -433,9 +431,9 @@ typedef struct ListenStmt
*/
typedef struct TransactionStmt
{
- NodeTag type;
- int command; /* BEGIN|END|ABORT */
-} TransactionStmt;
+ NodeTag type;
+ int command; /* BEGIN|END|ABORT */
+} TransactionStmt;
/* ----------------------
* Create View Statement
@@ -443,10 +441,10 @@ typedef struct TransactionStmt
*/
typedef struct ViewStmt
{
- NodeTag type;
- char *viewname; /* name of the view */
- Query *query; /* the SQL statement */
-} ViewStmt;
+ NodeTag type;
+ char *viewname; /* name of the view */
+ Query *query; /* the SQL statement */
+} ViewStmt;
/* ----------------------
* Load Statement
@@ -454,9 +452,9 @@ typedef struct ViewStmt
*/
typedef struct LoadStmt
{
- NodeTag type;
- char *filename; /* file to load */
-} LoadStmt;
+ NodeTag type;
+ char *filename; /* file to load */
+} LoadStmt;
/* ----------------------
* Createdb Statement
@@ -464,9 +462,9 @@ typedef struct LoadStmt
*/
typedef struct CreatedbStmt
{
- NodeTag type;
- char *dbname; /* database to create */
-} CreatedbStmt;
+ NodeTag type;
+ char *dbname; /* database to create */
+} CreatedbStmt;
/* ----------------------
* Destroydb Statement
@@ -474,9 +472,9 @@ typedef struct CreatedbStmt
*/
typedef struct DestroydbStmt
{
- NodeTag type;
- char *dbname; /* database to drop */
-} DestroydbStmt;
+ NodeTag type;
+ char *dbname; /* database to drop */
+} DestroydbStmt;
/* ----------------------
* Cluster Statement (support pbrown's cluster index implementation)
@@ -484,10 +482,10 @@ typedef struct DestroydbStmt
*/
typedef struct ClusterStmt
{
- NodeTag type;
- char *relname; /* relation being indexed */
- char *indexname; /* original index defined */
-} ClusterStmt;
+ NodeTag type;
+ char *relname; /* relation being indexed */
+ char *indexname; /* original index defined */
+} ClusterStmt;
/* ----------------------
* Vacuum Statement
@@ -495,12 +493,12 @@ typedef struct ClusterStmt
*/
typedef struct VacuumStmt
{
- NodeTag type;
- bool verbose; /* print status info */
- bool analyze; /* analyze data */
- char *vacrel; /* table to vacuum */
- List *va_spec; /* columns to analyse */
-} VacuumStmt;
+ NodeTag type;
+ bool verbose; /* print status info */
+ bool analyze; /* analyze data */
+ char *vacrel; /* table to vacuum */
+ List *va_spec; /* columns to analyse */
+} VacuumStmt;
/* ----------------------
* Explain Statement
@@ -508,10 +506,10 @@ typedef struct VacuumStmt
*/
typedef struct ExplainStmt
{
- NodeTag type;
- Query *query; /* the query */
- bool verbose; /* print plan info */
-} ExplainStmt;
+ NodeTag type;
+ Query *query; /* the query */
+ bool verbose; /* print plan info */
+} ExplainStmt;
/* ----------------------
* Set Statement
@@ -520,10 +518,10 @@ typedef struct ExplainStmt
typedef struct VariableSetStmt
{
- NodeTag type;
- char *name;
- char *value;
-} VariableSetStmt;
+ NodeTag type;
+ char *name;
+ char *value;
+} VariableSetStmt;
/* ----------------------
* Show Statement
@@ -532,9 +530,9 @@ typedef struct VariableSetStmt
typedef struct VariableShowStmt
{
- NodeTag type;
- char *name;
-} VariableShowStmt;
+ NodeTag type;
+ char *name;
+} VariableShowStmt;
/* ----------------------
* Reset Statement
@@ -543,9 +541,9 @@ typedef struct VariableShowStmt
typedef struct VariableResetStmt
{
- NodeTag type;
- char *name;
-} VariableResetStmt;
+ NodeTag type;
+ char *name;
+} VariableResetStmt;
/*****************************************************************************
@@ -558,13 +556,13 @@ typedef struct VariableResetStmt
*/
typedef struct AppendStmt
{
- NodeTag type;
- char *relname; /* relation to insert into */
- List *cols; /* names of the columns */
- List *targetList; /* the target list (of ResTarget) */
- List *fromClause; /* the from clause */
- Node *whereClause;/* qualifications */
-} AppendStmt;
+ NodeTag type;
+ char *relname; /* relation to insert into */
+ List *cols; /* names of the columns */
+ List *targetList; /* the target list (of ResTarget) */
+ List *fromClause; /* the from clause */
+ Node *whereClause; /* qualifications */
+} AppendStmt;
/* ----------------------
* Delete Statement
@@ -572,10 +570,10 @@ typedef struct AppendStmt
*/
typedef struct DeleteStmt
{
- NodeTag type;
- char *relname; /* relation to delete from */
- Node *whereClause;/* qualifications */
-} DeleteStmt;
+ NodeTag type;
+ char *relname; /* relation to delete from */
+ Node *whereClause; /* qualifications */
+} DeleteStmt;
/* ----------------------
* Update Statement
@@ -583,12 +581,12 @@ typedef struct DeleteStmt
*/
typedef struct ReplaceStmt
{
- NodeTag type;
- char *relname; /* relation to update */
- List *targetList; /* the target list (of ResTarget) */
- Node *whereClause;/* qualifications */
- List *fromClause; /* the from clause */
-} ReplaceStmt;
+ NodeTag type;
+ char *relname; /* relation to update */
+ List *targetList; /* the target list (of ResTarget) */
+ Node *whereClause; /* qualifications */
+ List *fromClause; /* the from clause */
+} ReplaceStmt;
/* ----------------------
* Create Cursor Statement
@@ -596,16 +594,16 @@ typedef struct ReplaceStmt
*/
typedef struct CursorStmt
{
- NodeTag type;
- char *portalname; /* the portal (cursor) to create */
- bool binary; /* a binary (internal) portal? */
- char *unique; /* NULL, "*", or unique attribute name */
- List *targetList; /* the target list (of ResTarget) */
- List *fromClause; /* the from clause */
- Node *whereClause;/* qualifications */
- List *groupClause;/* group by clause */
- List *sortClause; /* sort clause (a list of SortGroupBy's) */
-} CursorStmt;
+ NodeTag type;
+ char *portalname; /* the portal (cursor) to create */
+ bool binary; /* a binary (internal) portal? */
+ char *unique; /* NULL, "*", or unique attribute name */
+ List *targetList; /* the target list (of ResTarget) */
+ List *fromClause; /* the from clause */
+ Node *whereClause; /* qualifications */
+ List *groupClause; /* group by clause */
+ List *sortClause; /* sort clause (a list of SortGroupBy's) */
+} CursorStmt;
/* ----------------------
* Select Statement
@@ -613,17 +611,17 @@ typedef struct CursorStmt
*/
typedef struct RetrieveStmt
{
- NodeTag type;
- char *unique; /* NULL, '*', or unique attribute name */
- char *into; /* name of table (for select into table) */
- List *targetList; /* the target list (of ResTarget) */
- List *fromClause; /* the from clause */
- Node *whereClause;/* qualifications */
- List *groupClause;/* group by clause */
- Node *havingClause; /* having conditional-expression */
- List *selectClause; /* subselect parameters */
- List *sortClause; /* sort clause (a list of SortGroupBy's) */
-} RetrieveStmt;
+ NodeTag type;
+ char *unique; /* NULL, '*', or unique attribute name */
+ char *into; /* name of table (for select into table) */
+ List *targetList; /* the target list (of ResTarget) */
+ List *fromClause; /* the from clause */
+ Node *whereClause; /* qualifications */
+ List *groupClause; /* group by clause */
+ Node *havingClause; /* having conditional-expression */
+ List *selectClause; /* subselect parameters */
+ List *sortClause; /* sort clause (a list of SortGroupBy's) */
+} RetrieveStmt;
/****************************************************************************
@@ -635,50 +633,50 @@ typedef struct RetrieveStmt
*/
typedef struct SubSelect
{
- NodeTag type;
- char *unique; /* NULL, '*', or unique attribute name */
- List *targetList; /* the target list (of ResTarget) */
- List *fromClause; /* the from clause */
- Node *whereClause;/* qualifications */
- List *groupClause;/* group by clause */
- Node *havingClause; /* having conditional-expression */
-} SubSelect;
+ NodeTag type;
+ char *unique; /* NULL, '*', or unique attribute name */
+ List *targetList; /* the target list (of ResTarget) */
+ List *fromClause; /* the from clause */
+ Node *whereClause; /* qualifications */
+ List *groupClause; /* group by clause */
+ Node *havingClause; /* having conditional-expression */
+} SubSelect;
/*
* TypeName - specifies a type in definitions
*/
typedef struct TypeName
{
- NodeTag type;
- char *name; /* name of the type */
- bool timezone; /* timezone specified? */
- bool setof; /* is a set? */
- List *arrayBounds;/* array bounds */
- int typlen; /* length for char() and varchar() */
-} TypeName;
+ NodeTag type;
+ char *name; /* name of the type */
+ bool timezone; /* timezone specified? */
+ bool setof; /* is a set? */
+ List *arrayBounds; /* array bounds */
+ int typlen; /* length for char() and varchar() */
+} TypeName;
/*
* ParamNo - specifies a parameter reference
*/
typedef struct ParamNo
{
- NodeTag type;
- int number; /* the number of the parameter */
- TypeName *typename; /* the typecast */
-} ParamNo;
+ NodeTag type;
+ int number; /* the number of the parameter */
+ TypeName *typename; /* the typecast */
+} ParamNo;
/*
* A_Expr - binary expressions
*/
typedef struct A_Expr
{
- NodeTag type;
- int oper; /* type of operation
+ NodeTag type;
+ int oper; /* type of operation
* {OP,OR,AND,NOT,ISNULL,NOTNULL} */
- char *opname; /* name of operator/function */
- Node *lexpr; /* left argument */
- Node *rexpr; /* right argument */
-} A_Expr;
+ char *opname; /* name of operator/function */
+ Node *lexpr; /* left argument */
+ Node *rexpr; /* right argument */
+} A_Expr;
/*
* Attr -
@@ -688,35 +686,35 @@ typedef struct A_Expr
*/
typedef struct Attr
{
- NodeTag type;
- char *relname; /* name of relation (can be "*") */
- ParamNo *paramNo; /* or a parameter */
- List *attrs; /* attributes (possibly nested); list of
+ NodeTag type;
+ char *relname; /* name of relation (can be "*") */
+ ParamNo *paramNo; /* or a parameter */
+ List *attrs; /* attributes (possibly nested); list of
* Values (strings) */
- List *indirection;/* array refs (list of A_Indices') */
-} Attr;
+ List *indirection; /* array refs (list of A_Indices') */
+} Attr;
/*
* A_Const - a constant expression
*/
typedef struct A_Const
{
- NodeTag type;
- Value val; /* the value (with the tag) */
- TypeName *typename; /* typecast */
-} A_Const;
+ NodeTag type;
+ Value val; /* the value (with the tag) */
+ TypeName *typename; /* typecast */
+} A_Const;
/*
* ColumnDef - column definition (used in various creates)
*/
typedef struct ColumnDef
{
- NodeTag type;
- char *colname; /* name of column */
- TypeName *typename; /* type of column */
- bool is_not_null;/* flag to NOT NULL constraint */
- char *defval; /* default value of column */
-} ColumnDef;
+ NodeTag type;
+ char *colname; /* name of column */
+ TypeName *typename; /* type of column */
+ bool is_not_null; /* flag to NOT NULL constraint */
+ char *defval; /* default value of column */
+} ColumnDef;
/*
* Ident -
@@ -727,32 +725,32 @@ typedef struct ColumnDef
*/
typedef struct Ident
{
- NodeTag type;
- char *name; /* its name */
- List *indirection;/* array references */
- bool isRel; /* is a relation - filled in by
+ NodeTag type;
+ char *name; /* its name */
+ List *indirection; /* array references */
+ bool isRel; /* is a relation - filled in by
* transformExpr() */
-} Ident;
+} Ident;
/*
* FuncCall - a function/aggregate invocation
*/
typedef struct FuncCall
{
- NodeTag type;
- char *funcname; /* name of function */
- List *args; /* the arguments (list of exprs) */
-} FuncCall;
+ NodeTag type;
+ char *funcname; /* name of function */
+ List *args; /* the arguments (list of exprs) */
+} FuncCall;
/*
* A_Indices - array reference or bounds ([lidx:uidx] or [uidx])
*/
typedef struct A_Indices
{
- NodeTag type;
- Node *lidx; /* could be NULL */
- Node *uidx;
-} A_Indices;
+ NodeTag type;
+ Node *lidx; /* could be NULL */
+ Node *uidx;
+} A_Indices;
/*
* ResTarget -
@@ -760,77 +758,77 @@ typedef struct A_Indices
*/
typedef struct ResTarget
{
- NodeTag type;
- char *name; /* name of the result column */
- List *indirection;/* array references */
- Node *val; /* the value of the result (A_Expr or
+ NodeTag type;
+ char *name; /* name of the result column */
+ List *indirection; /* array references */
+ Node *val; /* the value of the result (A_Expr or
* Attr) (or A_Const) */
-} ResTarget;
+} ResTarget;
/*
* ParamString - used in with clauses
*/
typedef struct ParamString
{
- NodeTag type;
- char *name;
- char *val;
-} ParamString;
+ NodeTag type;
+ char *name;
+ char *val;
+} ParamString;
/*
* TimeRange - specifies a time range
*/
typedef struct TimeRange
{
- NodeTag type;
- char *startDate;
- char *endDate; /* snapshot if NULL */
-} TimeRange;
+ NodeTag type;
+ char *startDate;
+ char *endDate; /* snapshot if NULL */
+} TimeRange;
/*
* RelExpr - relation expressions
*/
typedef struct RelExpr
{
- NodeTag type;
- char *relname; /* the relation name */
- bool inh; /* inheritance query */
- TimeRange *timeRange; /* the time range */
-} RelExpr;
+ NodeTag type;
+ char *relname; /* the relation name */
+ bool inh; /* inheritance query */
+ TimeRange *timeRange; /* the time range */
+} RelExpr;
/*
* SortGroupBy - for order by clause
*/
typedef struct SortGroupBy
{
- NodeTag type;
- int resno; /* target number */
- char *range;
- char *name; /* name of column to sort on */
- char *useOp; /* operator to use */
-} SortGroupBy;
+ NodeTag type;
+ int resno; /* target number */
+ char *range;
+ char *name; /* name of column to sort on */
+ char *useOp; /* operator to use */
+} SortGroupBy;
/*
* RangeVar - range variable, used in from clauses
*/
typedef struct RangeVar
{
- NodeTag type;
- RelExpr *relExpr; /* the relation expression */
- char *name; /* the name to be referenced (optional) */
-} RangeVar;
+ NodeTag type;
+ RelExpr *relExpr; /* the relation expression */
+ char *name; /* the name to be referenced (optional) */
+} RangeVar;
/*
* IndexElem - index parameters (used in create index)
*/
typedef struct IndexElem
{
- NodeTag type;
- char *name; /* name of index */
- List *args; /* if not NULL, function index */
- char *class;
- TypeName *tname; /* type of index's keys (optional) */
-} IndexElem;
+ NodeTag type;
+ char *name; /* name of index */
+ List *args; /* if not NULL, function index */
+ char *class;
+ TypeName *tname; /* type of index's keys (optional) */
+} IndexElem;
/*
* DefElem -
@@ -838,10 +836,10 @@ typedef struct IndexElem
*/
typedef struct DefElem
{
- NodeTag type;
- char *defname;
- Node *arg; /* a (Value *) or a (TypeName *) */
-} DefElem;
+ NodeTag type;
+ char *defname;
+ Node *arg; /* a (Value *) or a (TypeName *) */
+} DefElem;
/****************************************************************************
@@ -857,11 +855,11 @@ typedef struct DefElem
*/
typedef struct TargetEntry
{
- NodeTag type;
- Resdom *resdom; /* fjoin overload this to be a list?? */
- Fjoin *fjoin;
- Node *expr; /* can be a list too */
-} TargetEntry;
+ NodeTag type;
+ Resdom *resdom; /* fjoin overload this to be a list?? */
+ Fjoin *fjoin;
+ Node *expr; /* can be a list too */
+} TargetEntry;
/*
* RangeTblEntry -
@@ -877,17 +875,17 @@ typedef struct TargetEntry
*/
typedef struct RangeTblEntry
{
- NodeTag type;
- char *relname; /* real name of the relation */
- TimeRange *timeRange; /* time range */
- char *refname; /* the reference name (specified in the
+ NodeTag type;
+ char *relname; /* real name of the relation */
+ TimeRange *timeRange; /* time range */
+ char *refname; /* the reference name (specified in the
* from clause) */
- Oid relid;
- bool inh; /* inheritance? */
- bool archive; /* filled in by plan_archive */
- bool inFromCl; /* comes from From Clause */
- TimeQual timeQual; /* filled in by pg_plan */
-} RangeTblEntry;
+ Oid relid;
+ bool inh; /* inheritance? */
+ bool archive; /* filled in by plan_archive */
+ bool inFromCl; /* comes from From Clause */
+ TimeQual timeQual; /* filled in by pg_plan */
+} RangeTblEntry;
/*
* SortClause -
@@ -895,10 +893,10 @@ typedef struct RangeTblEntry
*/
typedef struct SortClause
{
- NodeTag type;
- Resdom *resdom; /* attributes in tlist to be sorted */
- Oid opoid; /* sort operators */
-} SortClause;
+ NodeTag type;
+ Resdom *resdom; /* attributes in tlist to be sorted */
+ Oid opoid; /* sort operators */
+} SortClause;
/*
* GroupClause -
@@ -906,9 +904,9 @@ typedef struct SortClause
*/
typedef struct GroupClause
{
- NodeTag type;
- TargetEntry *entry; /* attributes to group on */
- Oid grpOpoid; /* the sort operator to use */
-} GroupClause;
+ NodeTag type;
+ TargetEntry *entry; /* attributes to group on */
+ Oid grpOpoid; /* the sort operator to use */
+} GroupClause;
#endif /* PARSENODES_H */
diff --git a/src/include/nodes/pg_list.h b/src/include/nodes/pg_list.h
index 9afe6dfac5e..166ce53bd63 100644
--- a/src/include/nodes/pg_list.h
+++ b/src/include/nodes/pg_list.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_list.h,v 1.6 1997/09/07 04:58:45 momjian Exp $
+ * $Id: pg_list.h,v 1.7 1997/09/08 02:37:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,14 +26,14 @@
*/
typedef struct Value
{
- NodeTag type; /* tag appropriately (eg. T_String) */
+ NodeTag type; /* tag appropriately (eg. T_String) */
union ValUnion
{
- char *str; /* string */
- long ival;
- double dval;
- } val;
-} Value;
+ char *str; /* string */
+ long ival;
+ double dval;
+ } val;
+} Value;
#define intVal(v) (((Value *)v)->val.ival)
#define floatVal(v) (((Value *)v)->val.dval)
@@ -46,14 +46,14 @@ typedef struct Value
*/
typedef struct List
{
- NodeTag type;
+ NodeTag type;
union
{
- void *ptr_value;
- int int_value;
- } elem;
- struct List *next;
-} List;
+ void *ptr_value;
+ int int_value;
+ } elem;
+ struct List *next;
+} List;
#define NIL ((List *) NULL)
@@ -81,40 +81,40 @@ typedef struct List
/*
* function prototypes in nodes/list.c
*/
-extern int length(List * list);
-extern List *append(List * list1, List * list2);
-extern List *nconc(List * list1, List * list2);
-extern List *lcons(void *datum, List * list);
-extern bool member(void *foo, List * bar);
-extern Value *makeInteger(long i);
-extern Value *makeFloat(double d);
-extern Value *makeString(char *str);
-extern List *makeList(void *elem,...);
-extern List *lappend(List * list, void *obj);
-extern List *lremove(void *elem, List * list);
-extern void freeList(List * list);
-extern List *LispRemove(void *elem, List * list);
-
-extern void *nth(int n, List * l);
-extern void set_nth(List * l, int n, void *elem);
-
-List *lconsi(int datum, List * list);
-List *lappendi(List * list, int datum);
-extern bool intMember(int, List *);
-extern List *intAppend(List * list1, List * list2);
-
-extern int nthi(int n, List * l);
-
-extern List *nreverse(List *);
-extern List *set_difference(List *, List *);
-extern List *set_differencei(List *, List *);
-extern List *LispUnion(List * foo, List * bar);
-extern List *LispUnioni(List * foo, List * bar);
-extern bool same(List * foo, List * bar);
+extern int length(List * list);
+extern List *append(List * list1, List * list2);
+extern List *nconc(List * list1, List * list2);
+extern List *lcons(void *datum, List * list);
+extern bool member(void *foo, List * bar);
+extern Value *makeInteger(long i);
+extern Value *makeFloat(double d);
+extern Value *makeString(char *str);
+extern List *makeList(void *elem,...);
+extern List *lappend(List * list, void *obj);
+extern List *lremove(void *elem, List * list);
+extern void freeList(List * list);
+extern List *LispRemove(void *elem, List * list);
+
+extern void *nth(int n, List * l);
+extern void set_nth(List * l, int n, void *elem);
+
+List *lconsi(int datum, List * list);
+List *lappendi(List * list, int datum);
+extern bool intMember(int, List *);
+extern List *intAppend(List * list1, List * list2);
+
+extern int nthi(int n, List * l);
+
+extern List *nreverse(List *);
+extern List *set_difference(List *, List *);
+extern List *set_differencei(List *, List *);
+extern List *LispUnion(List * foo, List * bar);
+extern List *LispUnioni(List * foo, List * bar);
+extern bool same(List * foo, List * bar);
/* should be in nodes.h but needs List */
/* in copyfuncs.c */
-extern List *listCopy(List *);
+extern List *listCopy(List *);
#endif /* PG_LIST_H */
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index 3353602e02c..6942d206fb8 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: plannodes.h,v 1.7 1997/09/07 04:58:46 momjian Exp $
+ * $Id: plannodes.h,v 1.8 1997/09/08 02:37:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -63,19 +63,19 @@
typedef struct Plan
{
- NodeTag type;
- Cost cost;
- int plan_size;
- int plan_width;
- int plan_tupperpage;
- EState *state; /* at execution time, state's of
+ NodeTag type;
+ Cost cost;
+ int plan_size;
+ int plan_width;
+ int plan_tupperpage;
+ EState *state; /* at execution time, state's of
* individual nodes point to one EState
* for the whole top-level plan */
- List *targetlist;
- List *qual; /* Node* or List* ?? */
- struct Plan *lefttree;
- struct Plan *righttree;
-} Plan;
+ List *targetlist;
+ List *qual; /* Node* or List* ?? */
+ struct Plan *lefttree;
+ struct Plan *righttree;
+} Plan;
/* ----------------
* these are are defined to avoid confusion problems with "left"
@@ -104,7 +104,7 @@ typedef struct Plan
* existential node
* ----------------
*/
-typedef Plan Existential;
+typedef Plan Existential;
/* ----------------
* result node -
@@ -113,10 +113,10 @@ typedef Plan Existential;
*/
typedef struct Result
{
- Plan plan;
- Node *resconstantqual;
- ResultState *resstate;
-} Result;
+ Plan plan;
+ Node *resconstantqual;
+ ResultState *resstate;
+} Result;
/* ----------------
* append node
@@ -124,12 +124,12 @@ typedef struct Result
*/
typedef struct Append
{
- Plan plan;
- List *unionplans;
- Index unionrelid;
- List *unionrtentries;
- AppendState *unionstate;
-} Append;
+ Plan plan;
+ List *unionplans;
+ Index unionrelid;
+ List *unionrtentries;
+ AppendState *unionstate;
+} Append;
/*
* ==========
@@ -138,16 +138,16 @@ typedef struct Append
*/
typedef struct Scan
{
- Plan plan;
- Index scanrelid; /* relid is index into the range table */
+ Plan plan;
+ Index scanrelid; /* relid is index into the range table */
CommonScanState *scanstate;
-} Scan;
+} Scan;
/* ----------------
* sequential scan node
* ----------------
*/
-typedef Scan SeqScan;
+typedef Scan SeqScan;
/* ----------------
* index scan node
@@ -155,11 +155,11 @@ typedef Scan SeqScan;
*/
typedef struct IndexScan
{
- Scan scan;
- List *indxid;
- List *indxqual;
+ Scan scan;
+ List *indxid;
+ List *indxqual;
IndexScanState *indxstate;
-} IndexScan;
+} IndexScan;
/*
* ==========
@@ -171,7 +171,7 @@ typedef struct IndexScan
* Join node
* ----------------
*/
-typedef Plan Join;
+typedef Plan Join;
/* ----------------
* nest loop join node
@@ -179,9 +179,9 @@ typedef Plan Join;
*/
typedef struct NestLoop
{
- Join join;
- NestLoopState *nlstate;
-} NestLoop;
+ Join join;
+ NestLoopState *nlstate;
+} NestLoop;
/* ----------------
* merge join node
@@ -189,13 +189,13 @@ typedef struct NestLoop
*/
typedef struct MergeJoin
{
- Join join;
- List *mergeclauses;
- Oid mergesortop;
- Oid *mergerightorder; /* inner sort operator */
- Oid *mergeleftorder; /* outer sort operator */
+ Join join;
+ List *mergeclauses;
+ Oid mergesortop;
+ Oid *mergerightorder;/* inner sort operator */
+ Oid *mergeleftorder; /* outer sort operator */
MergeJoinState *mergestate;
-} MergeJoin;
+} MergeJoin;
/* ----------------
* hash join (probe) node
@@ -203,15 +203,15 @@ typedef struct MergeJoin
*/
typedef struct HashJoin
{
- Join join;
- List *hashclauses;
- Oid hashjoinop;
- HashJoinState *hashjoinstate;
- HashJoinTable hashjointable;
- IpcMemoryKey hashjointablekey;
- int hashjointablesize;
- bool hashdone;
-} HashJoin;
+ Join join;
+ List *hashclauses;
+ Oid hashjoinop;
+ HashJoinState *hashjoinstate;
+ HashJoinTable hashjointable;
+ IpcMemoryKey hashjointablekey;
+ int hashjointablesize;
+ bool hashdone;
+} HashJoin;
/* ---------------
* aggregate node
@@ -219,11 +219,11 @@ typedef struct HashJoin
*/
typedef struct Agg
{
- Plan plan;
- int numAgg;
- Aggreg **aggs;
- AggState *aggstate;
-} Agg;
+ Plan plan;
+ int numAgg;
+ Aggreg **aggs;
+ AggState *aggstate;
+} Agg;
/* ---------------
* group node -
@@ -237,13 +237,12 @@ typedef struct Agg
*/
typedef struct Group
{
- Plan plan;
- bool tuplePerGroup; /* what tuples to return (see
- * above) */
- int numCols; /* number of group columns */
- AttrNumber *grpColIdx; /* index into the target list */
- GroupState *grpstate;
-} Group;
+ Plan plan;
+ bool tuplePerGroup; /* what tuples to return (see above) */
+ int numCols; /* number of group columns */
+ AttrNumber *grpColIdx; /* index into the target list */
+ GroupState *grpstate;
+} Group;
/*
* ==========
@@ -252,10 +251,10 @@ typedef struct Group
*/
typedef struct Temp
{
- Plan plan;
- Oid tempid;
- int keycount;
-} Temp;
+ Plan plan;
+ Oid tempid;
+ int keycount;
+} Temp;
/* ----------------
* materialization node
@@ -263,11 +262,11 @@ typedef struct Temp
*/
typedef struct Material
{
- Plan plan; /* temp node flattened out */
- Oid tempid;
- int keycount;
- MaterialState *matstate;
-} Material;
+ Plan plan; /* temp node flattened out */
+ Oid tempid;
+ int keycount;
+ MaterialState *matstate;
+} Material;
/* ----------------
* sort node
@@ -275,13 +274,13 @@ typedef struct Material
*/
typedef struct Sort
{
- Plan plan; /* temp node flattened out */
- Oid tempid;
- int keycount;
- SortState *sortstate;
- void *psortstate;
- bool cleaned;
-} Sort;
+ Plan plan; /* temp node flattened out */
+ Oid tempid;
+ int keycount;
+ SortState *sortstate;
+ void *psortstate;
+ bool cleaned;
+} Sort;
/* ----------------
* unique node
@@ -289,15 +288,15 @@ typedef struct Sort
*/
typedef struct Unique
{
- Plan plan; /* temp node flattened out */
- Oid tempid;
- int keycount;
- char *uniqueAttr; /* NULL if all attrs, or unique attribute
+ Plan plan; /* temp node flattened out */
+ Oid tempid;
+ int keycount;
+ char *uniqueAttr; /* NULL if all attrs, or unique attribute
* name */
- AttrNumber uniqueAttrNum; /* attribute number of attribute
- * to select distinct on */
- UniqueState *uniquestate;
-} Unique;
+ AttrNumber uniqueAttrNum; /* attribute number of attribute to select
+ * distinct on */
+ UniqueState *uniquestate;
+} Unique;
/* ----------------
* hash build node
@@ -305,13 +304,13 @@ typedef struct Unique
*/
typedef struct Hash
{
- Plan plan;
- Var *hashkey;
- HashState *hashstate;
- HashJoinTable hashtable;
- IpcMemoryKey hashtablekey;
- int hashtablesize;
-} Hash;
+ Plan plan;
+ Var *hashkey;
+ HashState *hashstate;
+ HashJoinTable hashtable;
+ IpcMemoryKey hashtablekey;
+ int hashtablesize;
+} Hash;
/* ---------------------
* choose node
@@ -319,9 +318,9 @@ typedef struct Hash
*/
typedef struct Choose
{
- Plan plan;
- List *chooseplanlist;
-} Choose;
+ Plan plan;
+ List *chooseplanlist;
+} Choose;
/* -------------------
* Tee node information
@@ -332,15 +331,15 @@ typedef struct Choose
*/
typedef struct Tee
{
- Plan plan;
- Plan *leftParent;
- Plan *rightParent;
- TeeState *teestate;
- char *teeTableName; /* the name of the table to
- * materialize the tee into */
- List *rtentries; /* the range table for the plan below the
+ Plan plan;
+ Plan *leftParent;
+ Plan *rightParent;
+ TeeState *teestate;
+ char *teeTableName; /* the name of the table to materialize
+ * the tee into */
+ List *rtentries; /* the range table for the plan below the
* Tee may be different than the parent
* plans */
-} Tee;
+} Tee;
#endif /* PLANNODES_H */
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index 66d5a52a17e..e28c3128857 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: primnodes.h,v 1.8 1997/09/07 04:58:46 momjian Exp $
+ * $Id: primnodes.h,v 1.9 1997/09/08 02:37:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -38,15 +38,15 @@
*/
typedef struct Resdom
{
- NodeTag type;
- AttrNumber resno;
- Oid restype;
- int reslen;
- char *resname;
- Index reskey;
- Oid reskeyop;
- int resjunk;
-} Resdom;
+ NodeTag type;
+ AttrNumber resno;
+ Oid restype;
+ int reslen;
+ char *resname;
+ Index reskey;
+ Oid reskeyop;
+ int resjunk;
+} Resdom;
/* -------------
* Fjoin
@@ -67,13 +67,13 @@ typedef struct Resdom
*/
typedef struct Fjoin
{
- NodeTag type;
- bool fj_initialized;
- int fj_nNodes;
- List *fj_innerNode;
- DatumPtr fj_results;
- BoolPtr fj_alwaysDone;
-} Fjoin;
+ NodeTag type;
+ bool fj_initialized;
+ int fj_nNodes;
+ List *fj_innerNode;
+ DatumPtr fj_results;
+ BoolPtr fj_alwaysDone;
+} Fjoin;
/* ----------------
* Expr
@@ -87,16 +87,16 @@ typedef struct Fjoin
typedef enum OpType
{
OP_EXPR, FUNC_EXPR, OR_EXPR, AND_EXPR, NOT_EXPR
-} OpType;
+} OpType;
typedef struct Expr
{
- NodeTag type;
- Oid typeOid; /* oid of the type of this expr */
- OpType opType; /* type of the op */
- Node *oper; /* could be Oper or Func */
- List *args; /* list of argument nodes */
-} Expr;
+ NodeTag type;
+ Oid typeOid; /* oid of the type of this expr */
+ OpType opType; /* type of the op */
+ Node *oper; /* could be Oper or Func */
+ List *args; /* list of argument nodes */
+} Expr;
/* ----------------
* Var
@@ -118,13 +118,13 @@ typedef struct Expr
typedef struct Var
{
- NodeTag type;
- Index varno;
- AttrNumber varattno;
- Oid vartype;
- Index varnoold; /* only used by optimizer */
- AttrNumber varoattno; /* only used by optimizer */
-} Var;
+ NodeTag type;
+ Index varno;
+ AttrNumber varattno;
+ Oid vartype;
+ Index varnoold; /* only used by optimizer */
+ AttrNumber varoattno; /* only used by optimizer */
+} Var;
/* ----------------
* Oper
@@ -148,13 +148,13 @@ typedef struct Var
*/
typedef struct Oper
{
- NodeTag type;
- Oid opno;
- Oid opid;
- Oid opresulttype;
- int opsize;
+ NodeTag type;
+ Oid opno;
+ Oid opid;
+ Oid opresulttype;
+ int opsize;
FunctionCachePtr op_fcache;
-} Oper;
+} Oper;
/* ----------------
@@ -175,15 +175,15 @@ typedef struct Oper
*/
typedef struct Const
{
- NodeTag type;
- Oid consttype;
- Size constlen;
- Datum constvalue;
- bool constisnull;
- bool constbyval;
- bool constisset;
- bool constiscast;
-} Const;
+ NodeTag type;
+ Oid consttype;
+ Size constlen;
+ Datum constvalue;
+ bool constisnull;
+ bool constbyval;
+ bool constisset;
+ bool constiscast;
+} Const;
/* ----------------
* Param
@@ -214,13 +214,13 @@ typedef struct Const
*/
typedef struct Param
{
- NodeTag type;
- int paramkind;
- AttrNumber paramid;
- char *paramname;
- Oid paramtype;
- List *param_tlist;
-} Param;
+ NodeTag type;
+ int paramkind;
+ AttrNumber paramid;
+ char *paramname;
+ Oid paramtype;
+ List *param_tlist;
+} Param;
/* ----------------
@@ -240,15 +240,15 @@ typedef struct Param
*/
typedef struct Func
{
- NodeTag type;
- Oid funcid;
- Oid functype;
- bool funcisindex;
- int funcsize;
+ NodeTag type;
+ Oid funcid;
+ Oid functype;
+ bool funcisindex;
+ int funcsize;
FunctionCachePtr func_fcache;
- List *func_tlist;
- List *func_planlist;
-} Func;
+ List *func_tlist;
+ List *func_planlist;
+} Func;
/* ----------------
* Aggreg
@@ -261,13 +261,13 @@ typedef struct Func
*/
typedef struct Aggreg
{
- NodeTag type;
- char *aggname;
- Oid basetype; /* base type of the aggregate */
- Oid aggtype; /* type of final result */
- Node *target; /* attribute to aggreg on */
- int aggno; /* index to ecxt_values */
-} Aggreg;
+ NodeTag type;
+ char *aggname;
+ Oid basetype; /* base type of the aggregate */
+ Oid aggtype; /* type of final result */
+ Node *target; /* attribute to aggreg on */
+ int aggno; /* index to ecxt_values */
+} Aggreg;
/* ----------------
* Array
@@ -286,15 +286,15 @@ typedef struct Aggreg
*/
typedef struct Array
{
- NodeTag type;
- Oid arrayelemtype;
- int arrayelemlength;
- bool arrayelembyval;
- int arrayndim;
- IntArray arraylow;
- IntArray arrayhigh;
- int arraylen;
-} Array;
+ NodeTag type;
+ Oid arrayelemtype;
+ int arrayelemlength;
+ bool arrayelembyval;
+ int arrayndim;
+ IntArray arraylow;
+ IntArray arrayhigh;
+ int arraylen;
+} Array;
/* ----------------
* ArrayRef:
@@ -310,15 +310,15 @@ typedef struct Array
*/
typedef struct ArrayRef
{
- NodeTag type;
- int refattrlength;
- int refelemlength;
- Oid refelemtype;
- bool refelembyval;
- List *refupperindexpr;
- List *reflowerindexpr;
- Node *refexpr;
- Node *refassgnexpr;
-} ArrayRef;
+ NodeTag type;
+ int refattrlength;
+ int refelemlength;
+ Oid refelemtype;
+ bool refelembyval;
+ List *refupperindexpr;
+ List *reflowerindexpr;
+ Node *refexpr;
+ Node *refassgnexpr;
+} ArrayRef;
#endif /* PRIMNODES_H */
diff --git a/src/include/nodes/print.h b/src/include/nodes/print.h
index 8e1a80267d0..bef8ce3a6ce 100644
--- a/src/include/nodes/print.h
+++ b/src/include/nodes/print.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: print.h,v 1.3 1997/09/07 04:58:47 momjian Exp $
+ * $Id: print.h,v 1.4 1997/09/08 02:37:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,16 +19,16 @@
#include "nodes/relation.h"
#include "executor/tuptable.h"
-extern void print(void *obj);
-extern void pprint(void *obj);
-extern void print_rt(List * rtable);
-extern void print_expr(Node * expr, List * rtable);
-extern void print_keys(List * keys, List * rtable);
-extern void print_tl(List * tlist, List * rtable);
-extern void print_slot(TupleTableSlot * slot);
+extern void print(void *obj);
+extern void pprint(void *obj);
+extern void print_rt(List * rtable);
+extern void print_expr(Node * expr, List * rtable);
+extern void print_keys(List * keys, List * rtable);
+extern void print_tl(List * tlist, List * rtable);
+extern void print_slot(TupleTableSlot * slot);
extern void
print_plan_recursive(Plan * p, Query * parsetree,
int indentLevel, char *label);
-extern void print_plan(Plan * p, Query * parsetree);
+extern void print_plan(Plan * p, Query * parsetree);
#endif /* PRINT_H */
diff --git a/src/include/nodes/readfuncs.h b/src/include/nodes/readfuncs.h
index 8a23d550a90..72007ec9132 100644
--- a/src/include/nodes/readfuncs.h
+++ b/src/include/nodes/readfuncs.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: readfuncs.h,v 1.3 1997/09/07 04:58:48 momjian Exp $
+ * $Id: readfuncs.h,v 1.4 1997/09/08 02:37:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,12 +16,12 @@
/*
* prototypes for functions in read.c (the lisp token parser)
*/
-extern char *lsptok(char *string, int *length);
-extern void *nodeRead(bool read_car_only);
+extern char *lsptok(char *string, int *length);
+extern void *nodeRead(bool read_car_only);
/*
* prototypes for functions in readfuncs.c
*/
-extern Node *parsePlanString(void);
+extern Node *parsePlanString(void);
#endif /* READFUNCS_H */
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index 7acbc3d466c..4dfcb6692dc 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: relation.h,v 1.5 1997/09/07 04:58:48 momjian Exp $
+ * $Id: relation.h,v 1.6 1997/09/08 02:37:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,7 +21,7 @@
* List of relation identifiers (indexes into the rangetable).
*/
-typedef List *Relid;
+typedef List *Relid;
/*
* Rel
@@ -73,117 +73,117 @@ typedef List *Relid;
typedef struct Rel
{
- NodeTag type;
+ NodeTag type;
/* all relations: */
- Relid relids;
+ Relid relids;
/* catalog statistics information */
- bool indexed;
- int pages;
- int tuples;
- int size;
- int width;
+ bool indexed;
+ int pages;
+ int tuples;
+ int size;
+ int width;
/* materialization information */
- List *targetlist;
- List *pathlist;
- struct Path *unorderedpath;
- struct Path *cheapestpath;
- bool pruneable;
+ List *targetlist;
+ List *pathlist;
+ struct Path *unorderedpath;
+ struct Path *cheapestpath;
+ bool pruneable;
/* used solely by indices: */
- Oid *classlist; /* classes of AM operators */
- int *indexkeys; /* keys over which we're indexing */
- Oid relam; /* OID of the access method (in pg_am) */
+ Oid *classlist; /* classes of AM operators */
+ int *indexkeys; /* keys over which we're indexing */
+ Oid relam; /* OID of the access method (in pg_am) */
- Oid indproc;
- List *indpred;
+ Oid indproc;
+ List *indpred;
/* used by various scans and joins: */
- Oid *ordering; /* OID of operators in sort order */
- List *clauseinfo; /* restriction clauses */
- List *joininfo; /* join clauses */
- List *innerjoin;
- List *superrels;
-} Rel;
+ Oid *ordering; /* OID of operators in sort order */
+ List *clauseinfo; /* restriction clauses */
+ List *joininfo; /* join clauses */
+ List *innerjoin;
+ List *superrels;
+} Rel;
-extern Var *get_expr(TargetEntry * foo);
+extern Var *get_expr(TargetEntry * foo);
typedef struct MergeOrder
{
- NodeTag type;
- Oid join_operator;
- Oid left_operator;
- Oid right_operator;
- Oid left_type;
- Oid right_type;
-} MergeOrder;
+ NodeTag type;
+ Oid join_operator;
+ Oid left_operator;
+ Oid right_operator;
+ Oid left_type;
+ Oid right_type;
+} MergeOrder;
typedef enum OrderType
{
MERGE_ORDER, SORTOP_ORDER
-} OrderType;
+} OrderType;
typedef struct PathOrder
{
- OrderType ordtype;
+ OrderType ordtype;
union
{
- Oid *sortop;
- MergeOrder *merge;
- } ord;
-} PathOrder;
+ Oid *sortop;
+ MergeOrder *merge;
+ } ord;
+} PathOrder;
typedef struct Path
{
- NodeTag type;
+ NodeTag type;
- Rel *parent;
- Cost path_cost;
+ Rel *parent;
+ Cost path_cost;
- NodeTag pathtype;
+ NodeTag pathtype;
- PathOrder p_ordering;
+ PathOrder p_ordering;
- List *keys;
- Cost outerjoincost;
- Relid joinid;
- List *locclauseinfo;
-} Path;
+ List *keys;
+ Cost outerjoincost;
+ Relid joinid;
+ List *locclauseinfo;
+} Path;
typedef struct IndexPath
{
- Path path;
- List *indexid;
- List *indexqual;
- int *indexkeys; /* to transform heap attnos into index
+ Path path;
+ List *indexid;
+ List *indexqual;
+ int *indexkeys; /* to transform heap attnos into index
* ones */
-} IndexPath;
+} IndexPath;
typedef struct JoinPath
{
- Path path;
- List *pathclauseinfo;
- Path *outerjoinpath;
- Path *innerjoinpath;
-} JoinPath;
+ Path path;
+ List *pathclauseinfo;
+ Path *outerjoinpath;
+ Path *innerjoinpath;
+} JoinPath;
typedef struct MergePath
{
- JoinPath jpath;
- List *path_mergeclauses;
- List *outersortkeys;
- List *innersortkeys;
-} MergePath;
+ JoinPath jpath;
+ List *path_mergeclauses;
+ List *outersortkeys;
+ List *innersortkeys;
+} MergePath;
typedef struct HashPath
{
- JoinPath jpath;
- List *path_hashclauses;
- List *outerhashkeys;
- List *innerhashkeys;
-} HashPath;
+ JoinPath jpath;
+ List *path_hashclauses;
+ List *outerhashkeys;
+ List *innerhashkeys;
+} HashPath;
/******
* Keys
@@ -191,17 +191,17 @@ typedef struct HashPath
typedef struct OrderKey
{
- NodeTag type;
- int attribute_number;
- Index array_index;
-} OrderKey;
+ NodeTag type;
+ int attribute_number;
+ Index array_index;
+} OrderKey;
typedef struct JoinKey
{
- NodeTag type;
- Var *outer;
- Var *inner;
-} JoinKey;
+ NodeTag type;
+ Var *outer;
+ Var *inner;
+} JoinKey;
/*******
* clause info
@@ -209,56 +209,56 @@ typedef struct JoinKey
typedef struct CInfo
{
- NodeTag type;
- Expr *clause; /* should be an OP clause */
- Cost selectivity;
- bool notclause;
- List *indexids;
+ NodeTag type;
+ Expr *clause; /* should be an OP clause */
+ Cost selectivity;
+ bool notclause;
+ List *indexids;
/* mergesort only */
- MergeOrder *mergesortorder;
+ MergeOrder *mergesortorder;
/* hashjoin only */
- Oid hashjoinoperator;
- Relid cinfojoinid;
-} CInfo;
+ Oid hashjoinoperator;
+ Relid cinfojoinid;
+} CInfo;
typedef struct JoinMethod
{
- NodeTag type;
- List *jmkeys;
- List *clauses;
-} JoinMethod;
+ NodeTag type;
+ List *jmkeys;
+ List *clauses;
+} JoinMethod;
typedef struct HInfo
{
- JoinMethod jmethod;
- Oid hashop;
-} HInfo;
+ JoinMethod jmethod;
+ Oid hashop;
+} HInfo;
typedef struct MInfo
{
- JoinMethod jmethod;
- MergeOrder *m_ordering;
-} MInfo;
+ JoinMethod jmethod;
+ MergeOrder *m_ordering;
+} MInfo;
typedef struct JInfo
{
- NodeTag type;
- List *otherrels;
- List *jinfoclauseinfo;
- bool mergesortable;
- bool hashjoinable;
- bool inactive;
-} JInfo;
+ NodeTag type;
+ List *otherrels;
+ List *jinfoclauseinfo;
+ bool mergesortable;
+ bool hashjoinable;
+ bool inactive;
+} JInfo;
typedef struct Iter
{
- NodeTag type;
- Node *iterexpr;
- Oid itertype; /* type of the iter expr (use for type
+ NodeTag type;
+ Node *iterexpr;
+ Oid itertype; /* type of the iter expr (use for type
* checking) */
-} Iter;
+} Iter;
/*
** Stream:
@@ -283,15 +283,15 @@ typedef struct Stream *StreamPtr;
typedef struct Stream
{
- NodeTag type;
- Path *pathptr;
- CInfo *cinfo;
- int *clausetype;
- struct Stream *upstream;
- struct Stream *downstream;
- bool groupup;
- Cost groupcost;
- Cost groupsel;
-} Stream;
+ NodeTag type;
+ Path *pathptr;
+ CInfo *cinfo;
+ int *clausetype;
+ struct Stream *upstream;
+ struct Stream *downstream;
+ bool groupup;
+ Cost groupcost;
+ Cost groupsel;
+} Stream;
#endif /* RELATION_H */