]> granicus.if.org Git - postgresql/commit
Fix planner and rewriter to follow SQL semantics for tables that are
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Oct 1999 04:23:24 +0000 (04:23 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Oct 1999 04:23:24 +0000 (04:23 +0000)
commit3eb1c8227751aecede58e742a13b07127a7e2652
treec2f606088b1536e385811667c7f032552b89afa6
parent4040fcfa78065882aa16895906ff8398aaaf1c23
Fix planner and rewriter to follow SQL semantics for tables that are
mentioned in FROM but not elsewhere in the query: such tables should be
joined over anyway.  Aside from being more standards-compliant, this allows
removal of some very ugly hacks for COUNT(*) processing.  Also, allow
HAVING clause without aggregate functions, since SQL does.  Clean up
CREATE RULE statement-list syntax the same way Bruce just fixed the
main stmtmulti production.
CAUTION: addition of a field to RangeTblEntry nodes breaks stored rules;
you will have to initdb if you have any rules.
21 files changed:
src/backend/commands/view.c
src/backend/executor/execMain.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/util/clauses.c
src/backend/parser/analyze.c
src/backend/parser/gram.y
src/backend/parser/parse_agg.c
src/backend/parser/parse_clause.c
src/backend/parser/parse_func.c
src/backend/parser/parse_relation.c
src/backend/rewrite/rewriteHandler.c
src/include/nodes/parsenodes.h
src/include/optimizer/planmain.h
src/include/parser/parse_relation.h
src/test/regress/expected/rules.out