diff options
author | Bruce Momjian <bruce@momjian.us> | 1997-12-24 06:06:58 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1997-12-24 06:06:58 +0000 |
commit | 6231e161c95a0bb1f40fa2693189fdd356095793 (patch) | |
tree | 66555682983ecc92f8cf91e4a6e7304878a652ef /src/include | |
parent | 18adbd9aed41ae905b567be1a04678fb902c0a78 (diff) | |
download | postgresql-6231e161c95a0bb1f40fa2693189fdd356095793.tar.gz postgresql-6231e161c95a0bb1f40fa2693189fdd356095793.zip |
Implementation of UNIONs.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/nodes/parsenodes.h | 20 | ||||
-rw-r--r-- | src/include/optimizer/prep.h | 4 |
2 files changed, 6 insertions, 18 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index d2b2066d3a8..a6b9a400ea5 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.38 1997/12/23 19:58:12 thomas Exp $ + * $Id: parsenodes.h,v 1.39 1997/12/24 06:06:53 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -58,6 +58,8 @@ typedef struct Query int qry_numAgg; /* number of aggregates in the target list */ Aggreg **qry_aggs; /* the aggregates */ + List *unionClause; /* unions are linked under the previous query */ + /* internal to planner */ List *base_relation_list_; /* base relation list */ List *join_relation_list_; /* list of relations */ @@ -634,6 +636,7 @@ typedef struct RetrieveStmt Node *havingClause; /* having conditional-expression */ List *unionClause; /* union subselect parameters */ List *sortClause; /* sort clause (a list of SortGroupBy's) */ + int unionall; /* union without unique sort */ } RetrieveStmt; @@ -642,21 +645,6 @@ typedef struct RetrieveStmt ****************************************************************************/ /* - * SubSelect - specifies subselect parameters - */ -typedef struct SubSelect -{ - NodeTag type; - char *unique; /* NULL, '*', or unique attribute name */ - int unionall; /* union without unique sort */ - 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 diff --git a/src/include/optimizer/prep.h b/src/include/optimizer/prep.h index 8f63f798cb8..7b22bb5f39e 100644 --- a/src/include/optimizer/prep.h +++ b/src/include/optimizer/prep.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: prep.h,v 1.9 1997/12/20 07:59:44 momjian Exp $ + * $Id: prep.h,v 1.10 1997/12/24 06:06:58 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -32,7 +32,7 @@ extern List *preprocess_targetlist(List *tlist, int command_type, */ typedef enum UnionFlag { - INHERITS_FLAG, VERSION_FLAG + INHERITS_FLAG, UNION_FLAG, VERSION_FLAG } UnionFlag; extern List *find_all_inheritors(List *unexamined_relids, |