diff options
Diffstat (limited to 'src/include/nodes/plannodes.h')
-rw-r--r-- | src/include/nodes/plannodes.h | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index ca5727f0152..d8e3df4829a 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: plannodes.h,v 1.43 2000/09/29 18:21:39 tgl Exp $ + * $Id: plannodes.h,v 1.44 2000/10/05 19:11:36 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -46,6 +46,7 @@ * Material MaterialState matstate; * Sort SortState sortstate; * Unique UniqueState uniquestate; + * SetOp SetOpState setopstate; * Hash HashState hashstate; * * ---------------------------------------------------------------- @@ -145,16 +146,19 @@ typedef struct Result /* ---------------- * append node + * + * Append nodes can modify the query's rtable during execution. + * If inheritrelid > 0, then the RTE with index inheritrelid is replaced + * by the i'th element of inheritrtable to execute the i'th subplan. + * We assume that this RTE is not used in any other part of the + * query plan tree, else confusion may result... * ---------------- */ typedef struct Append { Plan plan; List *appendplans; - List *unionrtables; /* List of range tables, one for each - * union query. */ - Index inheritrelid; /* The range table has to be changed for - * inheritance. */ + Index inheritrelid; List *inheritrtable; AppendState *appendstate; } Append; @@ -349,6 +353,29 @@ typedef struct Unique } Unique; /* ---------------- + * setop node + * ---------------- + */ +typedef enum SetOpCmd +{ + SETOPCMD_INTERSECT, + SETOPCMD_INTERSECT_ALL, + SETOPCMD_EXCEPT, + SETOPCMD_EXCEPT_ALL +} SetOpCmd; + +typedef struct SetOp +{ + Plan plan; + SetOpCmd cmd; /* what to do */ + int numCols; /* number of columns to check for + * duplicate-ness */ + AttrNumber *dupColIdx; /* indexes into the target list */ + AttrNumber flagColIdx; + SetOpState *setopstate; +} SetOp; + +/* ---------------- * hash build node * ---------------- */ |