diff options
| author | Bruce Momjian | 2001-03-22 04:01:46 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2001-03-22 04:01:46 +0000 |
| commit | 9e1552607a9dc6bc23e43d46770a9063ade4f3f0 (patch) | |
| tree | 6a230d81917ebc004e40cd46c48f2aa27eec153e /src/include/nodes | |
| parent | 6cf8707b828b14b5c2336076ce358b18b67829d6 (diff) | |
pgindent run. Make it all clean.
Diffstat (limited to 'src/include/nodes')
| -rw-r--r-- | src/include/nodes/execnodes.h | 52 | ||||
| -rw-r--r-- | src/include/nodes/memnodes.h | 16 | ||||
| -rw-r--r-- | src/include/nodes/nodes.h | 27 | ||||
| -rw-r--r-- | src/include/nodes/parsenodes.h | 42 | ||||
| -rw-r--r-- | src/include/nodes/plannodes.h | 10 | ||||
| -rw-r--r-- | src/include/nodes/primnodes.h | 190 | ||||
| -rw-r--r-- | src/include/nodes/relation.h | 12 |
7 files changed, 192 insertions, 157 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index b9c10e6b310..2cf9378cf11 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: execnodes.h,v 1.56 2001/01/29 00:39:20 tgl Exp $ + * $Id: execnodes.h,v 1.57 2001/03/22 04:00:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -65,7 +65,7 @@ typedef struct IndexInfo * There are two memory contexts associated with an ExprContext: * * ecxt_per_query_memory is a relatively long-lived context (such as * TransactionCommandContext); typically it's the same context the - * ExprContext node itself is allocated in. This context can be + * ExprContext node itself is allocated in. This context can be * used for purposes such as storing operator/function fcache nodes. * * ecxt_per_tuple_memory is a short-term context for expression results. * As the name suggests, it will typically be reset once per tuple, @@ -86,8 +86,8 @@ typedef struct ExprContext MemoryContext ecxt_per_query_memory; MemoryContext ecxt_per_tuple_memory; /* Values to substitute for Param nodes in expression */ - ParamExecData *ecxt_param_exec_vals; /* for PARAM_EXEC params */ - ParamListInfo ecxt_param_list_info; /* for other param types */ + ParamExecData *ecxt_param_exec_vals; /* for PARAM_EXEC params */ + ParamListInfo ecxt_param_list_info; /* for other param types */ /* Values to substitute for Aggref nodes in expression */ Datum *ecxt_aggvalues; /* precomputed values for Aggref nodes */ bool *ecxt_aggnulls; /* null flags for Aggref nodes */ @@ -153,7 +153,7 @@ typedef struct ProjectionInfo * in emitted tuples. For example, when we do an UPDATE query, * the planner adds a "junk" entry to the targetlist so that the tuples * returned to ExecutePlan() contain an extra attribute: the ctid of - * the tuple to be updated. This is needed to do the update, but we + * the tuple to be updated. This is needed to do the update, but we * don't want the ctid to be part of the stored new tuple! So, we * apply a "junk filter" to remove the junk attributes and form the * real output tuple. @@ -246,10 +246,11 @@ typedef struct EState ScanDirection es_direction; Snapshot es_snapshot; List *es_range_table; - ResultRelInfo *es_result_relations; /* array of ResultRelInfos */ - int es_num_result_relations; /* length of array */ - ResultRelInfo *es_result_relation_info; /* currently active array elt */ - JunkFilter *es_junkFilter; /* currently active junk filter */ + ResultRelInfo *es_result_relations; /* array of ResultRelInfos */ + int es_num_result_relations; /* length of array */ + ResultRelInfo *es_result_relation_info; /* currently active array + * elt */ + JunkFilter *es_junkFilter; /* currently active junk filter */ Relation es_into_relation_descriptor; ParamListInfo es_param_list_info; ParamExecData *es_param_exec_vals; /* this is for subselects */ @@ -257,11 +258,13 @@ typedef struct EState uint32 es_processed; /* # of tuples processed */ Oid es_lastoid; /* last oid processed (by INSERT) */ List *es_rowMark; /* not good place, but there is no other */ - MemoryContext es_query_cxt; /* per-query context in which EState lives */ + MemoryContext es_query_cxt; /* per-query context in which EState lives */ + /* * this ExprContext is for per-output-tuple operations, such as - * constraint checks and index-value computations. It will be reset - * for each output tuple. Note that it will be created only if needed. + * constraint checks and index-value computations. It will be reset + * for each output tuple. Note that it will be created only if + * needed. */ ExprContext *es_per_tuple_exprcontext; /* Below is to re-evaluate plan qual in READ COMMITTED mode */ @@ -484,8 +487,8 @@ typedef CommonState JoinState; /* ---------------- * NestLoopState information * - * NeedNewOuter true if need new outer tuple on next call - * MatchedOuter true if found a join match for current outer tuple + * NeedNewOuter true if need new outer tuple on next call + * MatchedOuter true if found a join match for current outer tuple * NullInnerTupleSlot prepared null tuple for left outer joins * ---------------- */ @@ -503,10 +506,10 @@ typedef struct NestLoopState * OuterSkipQual outerKey1 < innerKey1 ... * InnerSkipQual outerKey1 > innerKey1 ... * JoinState current "state" of join. see executor.h - * MatchedOuter true if found a join match for current outer tuple - * MatchedInner true if found a join match for current inner tuple - * OuterTupleSlot pointer to slot in tuple table for cur outer tuple - * InnerTupleSlot pointer to slot in tuple table for cur inner tuple + * MatchedOuter true if found a join match for current outer tuple + * MatchedInner true if found a join match for current inner tuple + * OuterTupleSlot pointer to slot in tuple table for cur outer tuple + * InnerTupleSlot pointer to slot in tuple table for cur inner tuple * MarkedTupleSlot pointer to slot in tuple table for marked tuple * NullOuterTupleSlot prepared null tuple for right outer joins * NullInnerTupleSlot prepared null tuple for left outer joins @@ -539,9 +542,9 @@ typedef struct MergeJoinState * hj_InnerHashKey the inner hash key in the hashjoin condition * hj_OuterTupleSlot tuple slot for outer tuples * hj_HashTupleSlot tuple slot for hashed tuples - * hj_NullInnerTupleSlot prepared null tuple for left outer joins - * hj_NeedNewOuter true if need new outer tuple on next call - * hj_MatchedOuter true if found a join match for current outer + * hj_NullInnerTupleSlot prepared null tuple for left outer joins + * hj_NeedNewOuter true if need new outer tuple on next call + * hj_MatchedOuter true if found a join match for current outer * hj_hashdone true if hash-table-build phase is done * ---------------- */ @@ -593,7 +596,7 @@ typedef struct MaterialState * during evaluation of an Agg node's output tuple(s). * ------------------------- */ -typedef struct AggStatePerAggData *AggStatePerAgg; /* private in nodeAgg.c */ +typedef struct AggStatePerAggData *AggStatePerAgg; /* private in nodeAgg.c */ typedef struct AggState { @@ -601,7 +604,8 @@ typedef struct AggState List *aggs; /* all Aggref nodes in targetlist & quals */ int numaggs; /* length of list (could be zero!) */ AggStatePerAgg peragg; /* per-Aggref working state */ - MemoryContext tup_cxt; /* context for per-output-tuple expressions */ + MemoryContext tup_cxt; /* context for per-output-tuple + * expressions */ MemoryContext agg_cxt[2]; /* pair of expression eval memory contexts */ int which_cxt; /* 0 or 1, indicates current agg_cxt */ bool agg_done; /* indicates completion of Agg scan */ @@ -659,7 +663,7 @@ typedef struct UniqueState * SetOpState information * * SetOp nodes are used "on top of" sort nodes to discard - * duplicate tuples returned from the sort phase. These are + * duplicate tuples returned from the sort phase. These are * more complex than a simple Unique since we have to count * how many duplicates to return. * ---------------- diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h index aae5c728210..374292b9e03 100644 --- a/src/include/nodes/memnodes.h +++ b/src/include/nodes/memnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: memnodes.h,v 1.20 2001/01/24 19:43:25 momjian Exp $ + * $Id: memnodes.h,v 1.21 2001/03/22 04:00:51 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -42,7 +42,7 @@ typedef struct MemoryContextMethods void (*init) (MemoryContext context); void (*reset) (MemoryContext context); void (*delete) (MemoryContext context); -#ifdef MEMORY_CONTEXT_CHECKING +#ifdef MEMORY_CONTEXT_CHECKING void (*check) (MemoryContext context); #endif void (*stats) (MemoryContext context); @@ -51,12 +51,12 @@ typedef struct MemoryContextMethods typedef struct MemoryContextData { - NodeTag type; /* identifies exact kind of context */ - MemoryContextMethods *methods; /* virtual function table */ - MemoryContext parent; /* NULL if no parent (toplevel context) */ - MemoryContext firstchild; /* head of linked list of children */ - MemoryContext nextchild; /* next child of same parent */ - char *name; /* context name (just for debugging) */ + NodeTag type; /* identifies exact kind of context */ + MemoryContextMethods *methods; /* virtual function table */ + MemoryContext parent; /* NULL if no parent (toplevel context) */ + MemoryContext firstchild; /* head of linked list of children */ + MemoryContext nextchild; /* next child of same parent */ + char *name; /* context name (just for debugging) */ } MemoryContextData; /* utils/palloc.h contains typedef struct MemoryContextData *MemoryContext */ diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index 1cd2aee397c..bf1a6eee4f4 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: nodes.h,v 1.86 2001/01/24 19:43:25 momjian Exp $ + * $Id: nodes.h,v 1.87 2001/03/22 04:00:51 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -172,7 +172,8 @@ typedef enum NodeTag T_RemoveAggrStmt, T_RemoveFuncStmt, T_RemoveOperStmt, - T_RemoveStmt_XXX, /* not used anymore; this tag# is available */ + T_RemoveStmt_XXX, /* not used anymore; this tag# is + * available */ T_RenameStmt, T_RuleStmt, T_NotifyStmt, @@ -225,11 +226,14 @@ typedef enum NodeTag T_RangeTblEntry, T_SortClause, T_GroupClause, - T_SubSelectXXX, /* not used anymore; this tag# is available */ - T_oldJoinExprXXX, /* not used anymore; this tag# is available */ + T_SubSelectXXX, /* not used anymore; this tag# is + * available */ + T_oldJoinExprXXX, /* not used anymore; this tag# is + * available */ T_CaseExpr, T_CaseWhen, - T_RowMarkXXX, /* not used anymore; this tag# is available */ + T_RowMarkXXX, /* not used anymore; this tag# is + * available */ T_FkConstraint, /*--------------------- @@ -347,19 +351,24 @@ typedef enum CmdType */ typedef enum JoinType { + /* * The canonical kinds of joins */ JOIN_INNER, /* matching tuple pairs only */ JOIN_LEFT, /* pairs + unmatched outer tuples */ - JOIN_FULL, /* pairs + unmatched outer + unmatched inner */ + JOIN_FULL, /* pairs + unmatched outer + unmatched + * inner */ JOIN_RIGHT, /* pairs + unmatched inner tuples */ + /* - * SQL92 considers UNION JOIN to be a kind of join, so list it here for - * parser convenience, even though it's not implemented like a join in - * the executor. (The planner must convert it to an Append plan.) + * SQL92 considers UNION JOIN to be a kind of join, so list it here + * for parser convenience, even though it's not implemented like a + * join in the executor. (The planner must convert it to an Append + * plan.) */ JOIN_UNION + /* * Eventually we will have some additional join types for efficient * support of queries like WHERE foo IN (SELECT bar FROM ...). diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 94264d0b4c8..3c093dd390f 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parsenodes.h,v 1.124 2001/01/24 19:43:25 momjian Exp $ + * $Id: parsenodes.h,v 1.125 2001/03/22 04:00:51 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -49,7 +49,8 @@ typedef struct Query bool hasSubLinks; /* has subquery SubLink */ List *rtable; /* list of range table entries */ - FromExpr *jointree; /* table join tree (FROM and WHERE clauses) */ + FromExpr *jointree; /* table join tree (FROM and WHERE + * clauses) */ List *rowMarks; /* integer list of RT indexes of relations * that are selected FOR UPDATE */ @@ -78,7 +79,7 @@ typedef struct Query * commit to the exact set of child tables at parse time. This field * ought to go in some sort of TopPlan plan node, not in the Query. */ - List *resultRelations; /* integer list of RT indexes, or NIL */ + List *resultRelations;/* integer list of RT indexes, or NIL */ /* internal to planner */ List *base_rel_list; /* list of base-relation RelOptInfos */ @@ -115,13 +116,14 @@ typedef enum InhOption typedef struct AlterTableStmt { NodeTag type; - char subtype; /* A = add column, T = alter column, D = drop column, - * C = add constraint, X = drop constraint, - * E = add toast table, - * U = change owner */ + char subtype; /* A = add column, T = alter column, D = + * drop column, C = add constraint, X = + * drop constraint, E = add toast table, U + * = change owner */ char *relname; /* table to work on */ InhOption inhOpt; /* recursively act on children? */ - char *name; /* column or constraint name to act on, or new owner */ + char *name; /* column or constraint name to act on, or + * new owner */ Node *def; /* definition of new column or constraint */ int behavior; /* CASCADE or RESTRICT drop behavior */ } AlterTableStmt; @@ -414,11 +416,11 @@ typedef struct DefineStmt * ---------------------- */ -#define DROP_TABLE 1 +#define DROP_TABLE 1 #define DROP_SEQUENCE 2 -#define DROP_VIEW 3 -#define DROP_INDEX 4 -#define DROP_RULE 5 +#define DROP_VIEW 3 +#define DROP_INDEX 4 +#define DROP_RULE 5 #define DROP_TYPE_P 6 typedef struct DropStmt @@ -798,10 +800,11 @@ typedef struct InsertStmt NodeTag type; char *relname; /* relation to insert into */ List *cols; /* optional: names of the target columns */ + /* - * An INSERT statement has *either* VALUES or SELECT, never both. - * If VALUES, a targetList is supplied (empty for DEFAULT VALUES). - * If SELECT, a complete SelectStmt (or set-operation tree) is supplied. + * An INSERT statement has *either* VALUES or SELECT, never both. If + * VALUES, a targetList is supplied (empty for DEFAULT VALUES). If + * SELECT, a complete SelectStmt (or set-operation tree) is supplied. */ List *targetList; /* the target list (of ResTarget) */ Node *selectStmt; /* the source SELECT */ @@ -857,6 +860,7 @@ typedef enum SetOperation typedef struct SelectStmt { NodeTag type; + /* * These fields are used only in "leaf" SelectStmts. */ @@ -870,6 +874,7 @@ typedef struct SelectStmt Node *whereClause; /* WHERE qualification */ List *groupClause; /* GROUP BY clauses */ Node *havingClause; /* HAVING conditional-expression */ + /* * These fields are used in both "leaf" SelectStmts and upper-level * SelectStmts. portalname/binary may only be set at the top level. @@ -880,6 +885,7 @@ typedef struct SelectStmt Node *limitOffset; /* # of result tuples to skip */ Node *limitCount; /* # of result tuples to return */ List *forUpdate; /* FOR UPDATE clause */ + /* * These fields are used only in upper-level SelectStmts. */ @@ -910,7 +916,8 @@ typedef struct SetOperationStmt /* Eventually add fields for CORRESPONDING spec here */ /* Fields derived during parse analysis: */ - List *colTypes; /* integer list of OIDs of output column types */ + List *colTypes; /* integer list of OIDs of output column + * types */ } SetOperationStmt; /**************************************************************************** @@ -1237,15 +1244,18 @@ typedef struct TargetEntry typedef struct RangeTblEntry { NodeTag type; + /* * Fields valid for a plain relation RTE (else NULL/zero): */ char *relname; /* real name of the relation */ Oid relid; /* OID of the relation */ + /* * Fields valid for a subquery RTE (else NULL): */ Query *subquery; /* the sub-query */ + /* * Fields valid in all RTEs: */ diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 49319e57c67..1ee5e93cb49 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: plannodes.h,v 1.48 2001/03/04 15:43:33 momjian Exp $ + * $Id: plannodes.h,v 1.49 2001/03/22 04:00:52 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -152,7 +152,7 @@ typedef struct Result * Generate the concatenation of the results of sub-plans. * * Append nodes are sometimes used to switch between several result relations - * (when the target of an UPDATE or DELETE is an inheritance set). Such a + * (when the target of an UPDATE or DELETE is an inheritance set). Such a * node will have isTarget true. The Append executor is then responsible * for updating the executor state to point at the correct target relation * whenever it switches subplans. @@ -215,11 +215,11 @@ typedef struct TidScan * * SubqueryScan is for scanning the output of a sub-query in the range table. * We need a special plan node above the sub-query's plan as a place to switch - * execution contexts. Although we are not scanning a physical relation, + * execution contexts. Although we are not scanning a physical relation, * we make this a descendant of Scan anyway for code-sharing purposes. * * Note: we store the sub-plan in the type-specific subplan field, not in - * the generic lefttree field as you might expect. This is because we do + * the generic lefttree field as you might expect. This is because we do * not want plan-tree-traversal routines to recurse into the subplan without * knowing that they are changing Query contexts. * ---------------- @@ -420,7 +420,7 @@ typedef struct Tee List *rtentries; /* the range table for the plan below the * Tee may be different than the parent * plans */ -} Tee; +} Tee; #endif diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index f5cd6ea461d..3ae8e09f57a 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -10,7 +10,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: primnodes.h,v 1.52 2001/02/14 21:35:05 tgl Exp $ + * $Id: primnodes.h,v 1.53 2001/03/22 04:00:52 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -54,17 +54,17 @@ typedef struct FunctionCache *FunctionCachePtr; */ typedef struct Resdom { - NodeTag type; - AttrNumber resno; /* attribute number */ - Oid restype; /* type of the value */ - int32 restypmod; /* type-specific modifier of the value */ - char *resname; /* name of the resdom (could be NULL) */ + NodeTag type; + AttrNumber resno; /* attribute number */ + Oid restype; /* type of the value */ + int32 restypmod; /* type-specific modifier of the value */ + char *resname; /* name of the resdom (could be NULL) */ Index ressortgroupref; - /* nonzero if referenced by a sort/group clause */ - Index reskey; /* order of key in a sort (for those > 0) */ - Oid reskeyop; /* sort operator's regproc Oid */ - bool resjunk; /* set to true to eliminate the attribute - * from final target list */ + /* nonzero if referenced by a sort/group clause */ + Index reskey; /* order of key in a sort (for those > 0) */ + Oid reskeyop; /* sort operator's regproc Oid */ + bool resjunk; /* set to true to eliminate the attribute + * from final target list */ } Resdom; /* @@ -73,25 +73,23 @@ typedef struct Resdom typedef struct Fjoin { NodeTag type; - bool fj_initialized; /* true if the Fjoin has already been - * initialized for the current target - * list evaluation */ - int fj_nNodes; /* The number of Iter nodes returning - * sets that the node will flatten */ + bool fj_initialized; /* true if the Fjoin has already been + * initialized for the current target list + * evaluation */ + int fj_nNodes; /* The number of Iter nodes returning sets + * that the node will flatten */ List *fj_innerNode; /* exactly one Iter node. We eval every * node in the outerList once then eval * the inner node to completion pair the * outerList result vector with each inner - * result to form the full result. When + * result to form the full result. When * the inner has been exhausted, we get * the next outer result vector and reset - * the inner. - */ + * the inner. */ DatumPtr fj_results; /* The complete (flattened) result vector */ BoolPtr fj_alwaysDone; /* a null vector to indicate sets with a * cardinality of 0, we treat them as the - * set {NULL}. - */ + * set {NULL}. */ } Fjoin; @@ -111,11 +109,11 @@ typedef enum OpType typedef struct Expr { NodeTag type; - Oid typeOid; /* oid of the type of this expression */ - OpType opType; /* type of this expression */ - Node *oper; /* operator node if needed (Oper, Func, or - * SubPlan) */ - List *args; /* arguments to this expression */ + Oid typeOid; /* oid of the type of this expression */ + OpType opType; /* type of this expression */ + Node *oper; /* operator node if needed (Oper, Func, or + * SubPlan) */ + List *args; /* arguments to this expression */ } Expr; /* @@ -139,17 +137,22 @@ typedef struct Expr typedef struct Var { NodeTag type; - Index varno; /* index of this var's relation in the range - * table (could also be INNER or OUTER) */ - AttrNumber varattno; /* attribute number of this var, or zero for all */ - Oid vartype; /* pg_type tuple OID for the type of this var */ - int32 vartypmod; /* pg_attribute typmod value */ + Index varno; /* index of this var's relation in the + * range table (could also be INNER or + * OUTER) */ + AttrNumber varattno; /* attribute number of this var, or zero + * for all */ + Oid vartype; /* pg_type tuple OID for the type of this + * var */ + int32 vartypmod; /* pg_attribute typmod value */ Index varlevelsup; - /* for subquery variables referencing outer - * relations; 0 in a normal var, >0 means N - * levels up */ - Index varnoold; /* original value of varno, for debugging */ - AttrNumber varoattno; /* original value of varattno */ + + /* + * for subquery variables referencing outer relations; 0 in a normal + * var, >0 means N levels up + */ + Index varnoold; /* original value of varno, for debugging */ + AttrNumber varoattno; /* original value of varattno */ } Var; /*-------------------- @@ -173,13 +176,13 @@ typedef struct Var typedef struct Oper { NodeTag type; - Oid opno; /* PG_OPERATOR OID of the operator */ - Oid opid; /* PG_PROC OID for the operator's underlying - * function */ + Oid opno; /* PG_OPERATOR OID of the operator */ + Oid opid; /* PG_PROC OID for the operator's + * underlying function */ Oid opresulttype; - /* PG_TYPE OID of the operator's return value */ + /* PG_TYPE OID of the operator's return value */ FunctionCachePtr op_fcache; - /* runtime state while running the function */ + /* runtime state while running the function */ } Oper; @@ -195,12 +198,12 @@ typedef struct Const bool constisnull; /* whether the constant is null (if true, * the other fields are undefined) */ bool constbyval; /* whether the information in constvalue - * if passed by value. If true, then all + * if passed by value. If true, then all * the information is stored in the datum. - * If false, then the datum contains a pointer - * to the information. */ - bool constisset; /* whether the const represents a set. - * The const value corresponding will be the + * If false, then the datum contains a + * pointer to the information. */ + bool constisset; /* whether the const represents a set. The + * const value corresponding will be the * query that defines the set. */ bool constiscast; } Const; @@ -230,12 +233,13 @@ typedef struct Const typedef struct Param { NodeTag type; - int paramkind; /* specifies the kind of parameter. See above */ - AttrNumber paramid; /* numeric identifier for literal-constant - * parameters ("$1") */ - char *paramname; /* attribute name for tuple-substitution - * parameters ("$.foo") */ - Oid paramtype; /* PG_TYPE OID of the parameter's value */ + int paramkind; /* specifies the kind of parameter. See + * above */ + AttrNumber paramid; /* numeric identifier for literal-constant + * parameters ("$1") */ + char *paramname; /* attribute name for tuple-substitution + * parameters ("$.foo") */ + Oid paramtype; /* PG_TYPE OID of the parameter's value */ } Param; @@ -245,13 +249,16 @@ typedef struct Param typedef struct Func { NodeTag type; - Oid funcid; /* PG_PROC OID of the function */ - Oid functype; /* PG_TYPE OID of the function's return value */ + Oid funcid; /* PG_PROC OID of the function */ + Oid functype; /* PG_TYPE OID of the function's return + * value */ FunctionCachePtr func_fcache; - /* runtime state while running this function. - * Where we are in the execution of the function - * if it returns more than one value, etc. - * See utils/fcache.h */ + + /* + * runtime state while running this function. Where we are in the + * execution of the function if it returns more than one value, etc. + * See utils/fcache.h + */ } Func; /* ---------------- @@ -274,14 +281,16 @@ typedef struct Iter typedef struct Aggref { NodeTag type; - char *aggname; /* name of the aggregate */ - Oid basetype; /* base type Oid of the aggregate - * (ie, input type) */ - Oid aggtype; /* type Oid of final result of the aggregate */ - Node *target; /* attribute or expression we are aggregating on */ - bool aggstar; /* TRUE if argument was really '*' */ - bool aggdistinct;/* TRUE if it's agg(DISTINCT ...) */ - int aggno; /* workspace for executor (see nodeAgg.c) */ + char *aggname; /* name of the aggregate */ + Oid basetype; /* base type Oid of the aggregate (ie, + * input type) */ + Oid aggtype; /* type Oid of final result of the + * aggregate */ + Node *target; /* attribute or expression we are + * aggregating on */ + bool aggstar; /* TRUE if argument was really '*' */ + bool aggdistinct; /* TRUE if it's agg(DISTINCT ...) */ + int aggno; /* workspace for executor (see nodeAgg.c) */ } Aggref; /* ---------------- @@ -343,12 +352,14 @@ typedef enum SubLinkType typedef struct SubLink { NodeTag type; - SubLinkType subLinkType;/* EXISTS, ALL, ANY, MULTIEXPR, EXPR */ - bool useor; /* TRUE to combine column results with "OR" - * not "AND" */ - List *lefthand; /* list of outer-query expressions on the left */ - List *oper; /* list of Oper nodes for combining operators */ - Node *subselect; /* subselect as Query* or parsetree */ + SubLinkType subLinkType; /* EXISTS, ALL, ANY, MULTIEXPR, EXPR */ + bool useor; /* TRUE to combine column results with + * "OR" not "AND" */ + List *lefthand; /* list of outer-query expressions on the + * left */ + List *oper; /* list of Oper nodes for combining + * operators */ + Node *subselect; /* subselect as Query* or parsetree */ } SubLink; /* ---------------- @@ -382,19 +393,19 @@ typedef struct SubLink typedef struct ArrayRef { NodeTag type; - int refattrlength; /* typlen of array type */ - int refelemlength; /* typlen of the array element type */ - Oid refelemtype; /* type of the result of the ArrayRef - * operation */ - bool refelembyval; /* is the element type pass-by-value? */ - List *refupperindexpr; /* expressions that evaluate to upper - * array indexes */ - List *reflowerindexpr; /* expressions that evaluate to lower - * array indexes */ - Node *refexpr; /* the expression that evaluates to an - * array value */ - Node *refassgnexpr; /* expression for the source value, or NULL - * if fetch */ + int refattrlength; /* typlen of array type */ + int refelemlength; /* typlen of the array element type */ + Oid refelemtype; /* type of the result of the ArrayRef + * operation */ + bool refelembyval; /* is the element type pass-by-value? */ + List *refupperindexpr;/* expressions that evaluate to upper + * array indexes */ + List *reflowerindexpr;/* expressions that evaluate to lower + * array indexes */ + Node *refexpr; /* the expression that evaluates to an + * array value */ + Node *refassgnexpr; /* expression for the source value, or + * NULL if fetch */ } ArrayRef; /* ---------------- @@ -459,7 +470,7 @@ typedef struct RelabelType * * NOTE: the qualification expressions present in JoinExpr nodes are * *in addition to* the query's main WHERE clause, which appears as the - * qual of the top-level FromExpr. The reason for associating quals with + * qual of the top-level FromExpr. The reason for associating quals with * specific nodes in the jointree is that the position of a qual is critical * when outer joins are present. (If we enforce a qual too soon or too late, * that may cause the outer join to produce the wrong set of NULL-extended @@ -489,12 +500,12 @@ typedef struct RangeTblRef /*---------- * JoinExpr - for SQL JOIN expressions * - * isNatural, using, and quals are interdependent. The user can write only + * isNatural, using, and quals are interdependent. The user can write only * one of NATURAL, USING(), or ON() (this is enforced by the grammar). * If he writes NATURAL then parse analysis generates the equivalent USING() * list, and from that fills in "quals" with the right equality comparisons. * If he writes USING() then "quals" is filled with equality comparisons. - * If he writes ON() then only "quals" is set. Note that NATURAL/USING + * If he writes ON() then only "quals" is set. Note that NATURAL/USING * are not equivalent to ON() since they also affect the output column list. * * alias is an Attr node representing the AS alias-clause attached to the @@ -519,7 +530,8 @@ typedef struct JoinExpr Node *quals; /* qualifiers on join, if any */ struct Attr *alias; /* user-written alias clause, if any */ List *colnames; /* output column names (list of String) */ - List *colvars; /* output column nodes (list of expressions) */ + List *colvars; /* output column nodes (list of + * expressions) */ } JoinExpr; /*---------- diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 4761d4ba7f2..f643ef87968 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: relation.h,v 1.53 2001/01/24 19:43:26 momjian Exp $ + * $Id: relation.h,v 1.54 2001/03/22 04:00:53 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -159,7 +159,7 @@ typedef struct RelOptInfo List *baserestrictinfo; /* RestrictInfo structures (if * base rel) */ Cost baserestrictcost; /* cost of evaluating the above */ - Relids outerjoinset; /* integer list of base relids */ + Relids outerjoinset; /* integer list of base relids */ List *joininfo; /* JoinInfo structures */ List *innerjoin; /* potential indexscans for nestloop joins */ @@ -436,7 +436,7 @@ typedef struct HashPath * When we construct a join rel that includes all the base rels referenced * in a multi-relation restriction clause, we place that clause into the * joinrestrictinfo lists of paths for the join rel, if neither left nor - * right sub-path includes all base rels referenced in the clause. The clause + * right sub-path includes all base rels referenced in the clause. The clause * will be applied at that join level, and will not propagate any further up * the join tree. (Note: the "predicate migration" code was once intended to * push restriction clauses up and down the plan tree based on evaluation @@ -512,8 +512,8 @@ typedef struct RestrictInfo Oid hashjoinoperator; /* copy of clause operator */ /* cache space for hashclause processing; -1 if not yet set */ - Selectivity left_dispersion; /* dispersion of left side */ - Selectivity right_dispersion; /* dispersion of right side */ + Selectivity left_dispersion;/* dispersion of left side */ + Selectivity right_dispersion; /* dispersion of right side */ } RestrictInfo; /* @@ -533,7 +533,7 @@ typedef struct RestrictInfo typedef struct JoinInfo { NodeTag type; - Relids unjoined_relids; /* some rels not yet part of my RelOptInfo */ + Relids unjoined_relids;/* some rels not yet part of my RelOptInfo */ List *jinfo_restrictinfo; /* relevant RestrictInfos */ } JoinInfo; |
