diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-09-29 18:21:41 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-09-29 18:21:41 +0000 |
commit | 3a94e789f5c9537d804210be3cb26f7fb08e3b9e (patch) | |
tree | f1eac12405e3c0ded881d7dd7e59cec35b30c335 /src/backend/optimizer/plan/subselect.c | |
parent | 6f64c2e54a0b14154a335249f4dca91a39c61c50 (diff) |
Subselects in FROM clause, per ISO syntax: FROM (SELECT ...) [AS] alias.
(Don't forget that an alias is required.) Views reimplemented as expanding
to subselect-in-FROM. Grouping, aggregates, DISTINCT in views actually
work now (he says optimistically). No UNION support in subselects/views
yet, but I have some ideas about that. Rule-related permissions checking
moved out of rewriter and into executor.
INITDB REQUIRED!
Diffstat (limited to 'src/backend/optimizer/plan/subselect.c')
-rw-r--r-- | src/backend/optimizer/plan/subselect.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c index 24a0aae55cd..182d1384aa1 100644 --- a/src/backend/optimizer/plan/subselect.c +++ b/src/backend/optimizer/plan/subselect.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.41 2000/09/12 21:06:54 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.42 2000/09/29 18:21:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -453,19 +453,6 @@ make_subplan(SubLink *slink) return result; } -/* this oughta be merged with LispUnioni */ - -static List * -set_unioni(List *l1, List *l2) -{ - if (l1 == NULL) - return l2; - if (l2 == NULL) - return l1; - - return nconc(l1, set_differencei(l2, l1)); -} - /* * finalize_primnode: build lists of subplans and params appearing * in the given expression tree. NOTE: items are added to lists passed in, @@ -680,6 +667,7 @@ SS_finalize_plan(Plan *plan) case T_Agg: case T_SeqScan: + case T_SubqueryScan: case T_Material: case T_Sort: case T_Unique: |