From 05e3d0ee8666b74f11ffad16f46e372459d6e53e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 5 Oct 2000 19:11:39 +0000 Subject: Reimplementation of UNION/INTERSECT/EXCEPT. INTERSECT/EXCEPT now meet the SQL92 semantics, including support for ALL option. All three can be used in subqueries and views. DISTINCT and ORDER BY work now in views, too. This rewrite fixes many problems with cross-datatype UNIONs and INSERT/SELECT where the SELECT yields different datatypes than the INSERT needs. I did that by making UNION subqueries and SELECT in INSERT be treated like subselects-in-FROM, thereby allowing an extra level of targetlist where the datatype conversions can be inserted safely. INITDB NEEDED! --- src/include/executor/nodeSetOp.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/include/executor/nodeSetOp.h (limited to 'src/include/executor/nodeSetOp.h') diff --git a/src/include/executor/nodeSetOp.h b/src/include/executor/nodeSetOp.h new file mode 100644 index 00000000000..0414cc46ef0 --- /dev/null +++ b/src/include/executor/nodeSetOp.h @@ -0,0 +1,25 @@ +/*------------------------------------------------------------------------- + * + * nodeSetOp.h + * + * + * + * Portions Copyright (c) 1996-2000, PostgreSQL, Inc + * Portions Copyright (c) 1994, Regents of the University of California + * + * $Id: nodeSetOp.h,v 1.1 2000/10/05 19:11:36 tgl Exp $ + * + *------------------------------------------------------------------------- + */ +#ifndef NODESETOP_H +#define NODESETOP_H + +#include "nodes/plannodes.h" + +extern TupleTableSlot *ExecSetOp(SetOp *node); +extern bool ExecInitSetOp(SetOp *node, EState *estate, Plan *parent); +extern int ExecCountSlotsSetOp(SetOp *node); +extern void ExecEndSetOp(SetOp *node); +extern void ExecReScanSetOp(SetOp *node, ExprContext *exprCtxt, Plan *parent); + +#endif /* NODESETOP_H */ -- cgit v1.2.3