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/path/joinpath.c | |
parent | 6f64c2e54a0b14154a335249f4dca91a39c61c50 (diff) | |
download | postgresql-3a94e789f5c9537d804210be3cb26f7fb08e3b9e.tar.gz |
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/path/joinpath.c')
-rw-r--r-- | src/backend/optimizer/path/joinpath.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index 367e1ac976..d8bfe6270d 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.56 2000/09/12 21:06:53 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.57 2000/09/29 18:21:32 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -643,10 +643,10 @@ hash_inner_and_outer(Query *root, continue; /* not hashjoinable */ /* - * If processing an outer join, only use explicit join clauses for + * If processing an outer join, only use its own join clauses for * hashing. For inner joins we need not be so picky. */ - if (isouterjoin && !restrictinfo->isjoinqual) + if (isouterjoin && restrictinfo->ispusheddown) continue; clause = restrictinfo->clause; @@ -665,7 +665,7 @@ hash_inner_and_outer(Query *root, continue; /* no good for these input relations */ /* always a one-element list of hash clauses */ - hashclauses = lcons(restrictinfo, NIL); + hashclauses = makeList1(restrictinfo); /* estimate disbursion of inner var for costing purposes */ innerdisbursion = estimate_disbursion(root, inner); @@ -820,7 +820,7 @@ select_mergejoin_clauses(RelOptInfo *joinrel, *right; /* - * If processing an outer join, only use explicit join clauses in the + * If processing an outer join, only use its own join clauses in the * merge. For inner joins we need not be so picky. * * Furthermore, if it is a right/full join then *all* the explicit @@ -832,7 +832,7 @@ select_mergejoin_clauses(RelOptInfo *joinrel, */ if (isouterjoin) { - if (!restrictinfo->isjoinqual) + if (restrictinfo->ispusheddown) continue; switch (jointype) { |