diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-10-05 19:11:39 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-10-05 19:11:39 +0000 |
commit | 05e3d0ee8666b74f11ffad16f46e372459d6e53e (patch) | |
tree | b273892bfda60f6bad315e84aaa2e9826e226931 /src/backend/executor/execProcnode.c | |
parent | 5292637f52c6db8a22f99177f228273cb69fc510 (diff) | |
download | postgresql-05e3d0ee8666b74f11ffad16f46e372459d6e53e.tar.gz postgresql-05e3d0ee8666b74f11ffad16f46e372459d6e53e.zip |
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!
Diffstat (limited to 'src/backend/executor/execProcnode.c')
-rw-r--r-- | src/backend/executor/execProcnode.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c index d6a15371311..6269a7caa10 100644 --- a/src/backend/executor/execProcnode.c +++ b/src/backend/executor/execProcnode.c @@ -12,7 +12,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.20 2000/09/29 18:21:29 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.21 2000/10/05 19:11:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -88,6 +88,7 @@ #include "executor/nodeNestloop.h" #include "executor/nodeResult.h" #include "executor/nodeSeqscan.h" +#include "executor/nodeSetOp.h" #include "executor/nodeSort.h" #include "executor/nodeSubplan.h" #include "executor/nodeSubqueryscan.h" @@ -199,6 +200,10 @@ ExecInitNode(Plan *node, EState *estate, Plan *parent) result = ExecInitUnique((Unique *) node, estate, parent); break; + case T_SetOp: + result = ExecInitSetOp((SetOp *) node, estate, parent); + break; + case T_Group: result = ExecInitGroup((Group *) node, estate, parent); break; @@ -322,6 +327,10 @@ ExecProcNode(Plan *node, Plan *parent) result = ExecUnique((Unique *) node); break; + case T_SetOp: + result = ExecSetOp((SetOp *) node); + break; + case T_Group: result = ExecGroup((Group *) node); break; @@ -401,6 +410,9 @@ ExecCountSlotsNode(Plan *node) case T_Unique: return ExecCountSlotsUnique((Unique *) node); + case T_SetOp: + return ExecCountSlotsSetOp((SetOp *) node); + case T_Group: return ExecCountSlotsGroup((Group *) node); @@ -519,6 +531,10 @@ ExecEndNode(Plan *node, Plan *parent) ExecEndUnique((Unique *) node); break; + case T_SetOp: + ExecEndSetOp((SetOp *) node); + break; + case T_Group: ExecEndGroup((Group *) node); break; |