diff options
Diffstat (limited to 'src/include/nodes/relation.h')
| -rw-r--r-- | src/include/nodes/relation.h | 234 |
1 files changed, 117 insertions, 117 deletions
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 7acbc3d466..4dfcb6692d 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 */ |
