summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2002-08-19 15:08:47 +0000
committerTom Lane2002-08-19 15:08:47 +0000
commit6ebc90b0455ffe9dc0bcaf85185b2746008003f6 (patch)
treeac89e57df60a93047eb69e28074556c0c9acdb6f /src/include
parent10b374aecfb50365eeb93e3434a77729d7a89541 (diff)
Remove Ident nodetype in favor of using String nodes; this fixes some
latent wrong-struct-type bugs and makes the coding style more uniform, since the majority of places working with lists of column names were already using Strings not Idents. While at it, remove vestigial support for Stream node type, and otherwise-unreferenced nodes.h entries for T_TupleCount and T_BaseNode. NB: full recompile is recommended due to changes of Node type numbers. This shouldn't force an initdb though.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/nodes/nodes.h6
-rw-r--r--src/include/nodes/parsenodes.h18
-rw-r--r--src/include/nodes/relation.h40
3 files changed, 6 insertions, 58 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 0e3922ec37a..f3437ce4cbf 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.115 2002/08/15 16:36:07 momjian Exp $
+ * $Id: nodes.h,v 1.116 2002/08/19 15:08:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -85,7 +85,6 @@ typedef enum NodeTag
T_PathKeyItem,
T_RestrictInfo,
T_JoinInfo,
- T_Stream,
T_IndexOptInfo,
/*
@@ -93,13 +92,11 @@ typedef enum NodeTag
*/
T_IndexInfo = 300,
T_ResultRelInfo,
- T_TupleCount,
T_TupleTableSlot,
T_ExprContext,
T_ProjectionInfo,
T_JunkFilter,
T_EState,
- T_BaseNode,
T_CommonState,
T_ResultState,
T_AppendState,
@@ -207,7 +204,6 @@ typedef enum NodeTag
T_A_Expr = 700,
T_ColumnRef,
T_ParamRef,
- T_Ident,
T_A_Const,
T_FuncCall,
T_A_Indices,
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 14d4126bbed..ecf59f30c10 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.200 2002/08/19 00:40:15 tgl Exp $
+ * $Id: parsenodes.h,v 1.201 2002/08/19 15:08:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -288,17 +288,6 @@ typedef struct ColumnDef
} ColumnDef;
/*
- * Ident -
- * an unqualified identifier. This is currently used only in the context
- * of column name lists.
- */
-typedef struct Ident
-{
- NodeTag type;
- char *name; /* its name */
-} Ident;
-
-/*
* FuncCall - a function or aggregate invocation
*
* agg_star indicates we saw a 'foo(*)' construct, while agg_distinct
@@ -869,7 +858,8 @@ typedef struct CopyStmt
{
NodeTag type;
RangeVar *relation; /* the relation to copy */
- List *attlist; /* List of Ident nodes, or NIL for all */
+ List *attlist; /* List of column names (as Strings),
+ * or NIL for all columns */
bool is_from; /* TO or FROM */
char *filename; /* if NULL, use stdin/stdout */
List *options; /* List of DefElem nodes */
@@ -936,7 +926,7 @@ typedef struct Constraint
char *name; /* name, or NULL if unnamed */
Node *raw_expr; /* expr, as untransformed parse tree */
char *cooked_expr; /* expr, as nodeToString representation */
- List *keys; /* Ident nodes naming referenced column(s) */
+ List *keys; /* String nodes naming referenced column(s) */
} Constraint;
/* ----------
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index 8715ad36c58..26c465fd037 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: relation.h,v 1.65 2002/06/20 20:29:51 momjian Exp $
+ * $Id: relation.h,v 1.66 2002/08/19 15:08:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -603,42 +603,4 @@ typedef struct JoinInfo
List *jinfo_restrictinfo; /* relevant RestrictInfos */
} JoinInfo;
-/*
- * Stream:
- * A stream represents a root-to-leaf path in a plan tree (i.e. a tree of
- * JoinPaths and Paths). The stream includes pointers to all Path nodes,
- * as well as to any clauses that reside above Path nodes. This structure
- * is used to make Path nodes and clauses look similar, so that Predicate
- * Migration can run.
- *
- * XXX currently, Predicate Migration is dead code, and so is this node type.
- * Probably should remove support for it.
- *
- * pathptr -- pointer to the current path node
- * cinfo -- if NULL, this stream node referes to the path node.
- * Otherwise this is a pointer to the current clause.
- * clausetype -- whether cinfo is in loc_restrictinfo or pathinfo in the
- * path node (XXX this is now used only by dead code, which is
- * good because the distinction no longer exists...)
- * upstream -- linked list pointer upwards
- * downstream -- ditto, downwards
- * groupup -- whether or not this node is in a group with the node upstream
- * groupcost -- total cost of the group that node is in
- * groupsel -- total selectivity of the group that node is in
- */
-typedef struct Stream *StreamPtr;
-
-typedef struct Stream
-{
- NodeTag type;
- Path *pathptr;
- RestrictInfo *cinfo;
- int *clausetype;
- StreamPtr upstream;
- StreamPtr downstream;
- bool groupup;
- Cost groupcost;
- Selectivity groupsel;
-} Stream;
-
#endif /* RELATION_H */