From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Implement SQL-standard WITH clauses, including WITH RECURSIVE. |
Date: | 2008-10-04 21:56:56 |
Message-ID: | 20081004215656.0F2A57545A4@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Implement SQL-standard WITH clauses, including WITH RECURSIVE.
There are some unimplemented aspects: recursive queries must use UNION ALL
(should allow UNION too), and we don't have SEARCH or CYCLE clauses.
These might or might not get done for 8.4, but even without them it's a
pretty useful feature.
There are also a couple of small loose ends and definitional quibbles,
which I'll send a memo about to pgsql-hackers shortly. But let's land
the patch now so we can get on with other development.
Yoshiyuki Asaba, with lots of help from Tatsuo Ishii and Tom Lane
Modified Files:
--------------
pgsql/doc/src/sgml:
errcodes.sgml (r1.24 -> r1.25)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/errcodes.sgml?r1=1.24&r2=1.25)
queries.sgml (r1.45 -> r1.46)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/queries.sgml?r1=1.45&r2=1.46)
pgsql/doc/src/sgml/ref:
select.sgml (r1.104 -> r1.105)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/select.sgml?r1=1.104&r2=1.105)
select_into.sgml (r1.40 -> r1.41)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/select_into.sgml?r1=1.40&r2=1.41)
pgsql/src/backend/catalog:
dependency.c (r1.80 -> r1.81)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/dependency.c?r1=1.80&r2=1.81)
pgsql/src/backend/commands:
explain.c (r1.178 -> r1.179)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/explain.c?r1=1.178&r2=1.179)
pgsql/src/backend/executor:
Makefile (r1.27 -> r1.28)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/Makefile?r1=1.27&r2=1.28)
execAmi.c (r1.98 -> r1.99)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execAmi.c?r1=1.98&r2=1.99)
execProcnode.c (r1.62 -> r1.63)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execProcnode.c?r1=1.62&r2=1.63)
nodeSubplan.c (r1.94 -> r1.95)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeSubplan.c?r1=1.94&r2=1.95)
pgsql/src/backend/nodes:
copyfuncs.c (r1.405 -> r1.406)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/copyfuncs.c?r1=1.405&r2=1.406)
equalfuncs.c (r1.331 -> r1.332)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/equalfuncs.c?r1=1.331&r2=1.332)
nodeFuncs.c (r1.32 -> r1.33)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/nodeFuncs.c?r1=1.32&r2=1.33)
outfuncs.c (r1.339 -> r1.340)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/outfuncs.c?r1=1.339&r2=1.340)
print.c (r1.89 -> r1.90)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/print.c?r1=1.89&r2=1.90)
readfuncs.c (r1.214 -> r1.215)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/readfuncs.c?r1=1.214&r2=1.215)
pgsql/src/backend/optimizer/path:
allpaths.c (r1.173 -> r1.174)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/allpaths.c?r1=1.173&r2=1.174)
clausesel.c (r1.93 -> r1.94)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/clausesel.c?r1=1.93&r2=1.94)
costsize.c (r1.197 -> r1.198)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/costsize.c?r1=1.197&r2=1.198)
joinpath.c (r1.117 -> r1.118)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/joinpath.c?r1=1.117&r2=1.118)
pgsql/src/backend/optimizer/plan:
createplan.c (r1.248 -> r1.249)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/createplan.c?r1=1.248&r2=1.249)
planner.c (r1.243 -> r1.244)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/planner.c?r1=1.243&r2=1.244)
setrefs.c (r1.144 -> r1.145)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/setrefs.c?r1=1.144&r2=1.145)
subselect.c (r1.140 -> r1.141)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/subselect.c?r1=1.140&r2=1.141)
pgsql/src/backend/optimizer/prep:
prepjointree.c (r1.54 -> r1.55)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepjointree.c?r1=1.54&r2=1.55)
prepunion.c (r1.155 -> r1.156)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepunion.c?r1=1.155&r2=1.156)
pgsql/src/backend/optimizer/util:
clauses.c (r1.267 -> r1.268)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/clauses.c?r1=1.267&r2=1.268)
pathnode.c (r1.147 -> r1.148)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/pathnode.c?r1=1.147&r2=1.148)
plancat.c (r1.151 -> r1.152)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/plancat.c?r1=1.151&r2=1.152)
relnode.c (r1.90 -> r1.91)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/relnode.c?r1=1.90&r2=1.91)
pgsql/src/backend/parser:
Makefile (r1.47 -> r1.48)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/Makefile?r1=1.47&r2=1.48)
analyze.c (r1.379 -> r1.380)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/analyze.c?r1=1.379&r2=1.380)
gram.y (r2.624 -> r2.625)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.624&r2=2.625)
keywords.c (r1.201 -> r1.202)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/keywords.c?r1=1.201&r2=1.202)
parse_agg.c (r1.83 -> r1.84)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_agg.c?r1=1.83&r2=1.84)
parse_clause.c (r1.179 -> r1.180)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_clause.c?r1=1.179&r2=1.180)
parse_relation.c (r1.135 -> r1.136)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_relation.c?r1=1.135&r2=1.136)
parse_target.c (r1.164 -> r1.165)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_target.c?r1=1.164&r2=1.165)
parse_type.c (r1.99 -> r1.100)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_type.c?r1=1.99&r2=1.100)
pgsql/src/backend/rewrite:
rewriteDefine.c (r1.129 -> r1.130)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/rewrite/rewriteDefine.c?r1=1.129&r2=1.130)
rewriteHandler.c (r1.180 -> r1.181)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/rewrite/rewriteHandler.c?r1=1.180&r2=1.181)
rewriteManip.c (r1.113 -> r1.114)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/rewrite/rewriteManip.c?r1=1.113&r2=1.114)
pgsql/src/backend/utils/adt:
ruleutils.c (r1.284 -> r1.285)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.284&r2=1.285)
pgsql/src/backend/utils/cache:
plancache.c (r1.22 -> r1.23)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/plancache.c?r1=1.22&r2=1.23)
pgsql/src/backend/utils/sort:
tuplestore.c (r1.40 -> r1.41)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/sort/tuplestore.c?r1=1.40&r2=1.41)
pgsql/src/bin/psql:
tab-complete.c (r1.172 -> r1.173)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/tab-complete.c?r1=1.172&r2=1.173)
pgsql/src/include/catalog:
catversion.h (r1.491 -> r1.492)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.491&r2=1.492)
pgsql/src/include/nodes:
execnodes.h (r1.188 -> r1.189)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/execnodes.h?r1=1.188&r2=1.189)
nodeFuncs.h (r1.28 -> r1.29)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/nodeFuncs.h?r1=1.28&r2=1.29)
nodes.h (r1.212 -> r1.213)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/nodes.h?r1=1.212&r2=1.213)
parsenodes.h (r1.375 -> r1.376)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/parsenodes.h?r1=1.375&r2=1.376)
plannodes.h (r1.103 -> r1.104)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/plannodes.h?r1=1.103&r2=1.104)
primnodes.h (r1.141 -> r1.142)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/primnodes.h?r1=1.141&r2=1.142)
relation.h (r1.159 -> r1.160)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/relation.h?r1=1.159&r2=1.160)
pgsql/src/include/optimizer:
cost.h (r1.92 -> r1.93)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/cost.h?r1=1.92&r2=1.93)
pathnode.h (r1.78 -> r1.79)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/pathnode.h?r1=1.78&r2=1.79)
planmain.h (r1.112 -> r1.113)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/planmain.h?r1=1.112&r2=1.113)
planner.h (r1.44 -> r1.45)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/planner.h?r1=1.44&r2=1.45)
subselect.h (r1.33 -> r1.34)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/subselect.h?r1=1.33&r2=1.34)
pgsql/src/include/parser:
parse_node.h (r1.56 -> r1.57)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_node.h?r1=1.56&r2=1.57)
parse_relation.h (r1.58 -> r1.59)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_relation.h?r1=1.58&r2=1.59)
pgsql/src/include/utils:
errcodes.h (r1.25 -> r1.26)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/errcodes.h?r1=1.25&r2=1.26)
tuplestore.h (r1.24 -> r1.25)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/tuplestore.h?r1=1.24&r2=1.25)
pgsql/src/interfaces/ecpg/preproc:
preproc.y (r1.372 -> r1.373)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/preproc.y?r1=1.372&r2=1.373)
pgsql/src/pl/plpgsql/src:
plerrcodes.h (r1.14 -> r1.15)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/plerrcodes.h?r1=1.14&r2=1.15)
pgsql/src/test/regress:
parallel_schedule (r1.48 -> r1.49)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/parallel_schedule?r1=1.48&r2=1.49)
serial_schedule (r1.45 -> r1.46)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/serial_schedule?r1=1.45&r2=1.46)
Added Files:
-----------
pgsql/src/backend/executor:
nodeCtescan.c (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeCtescan.c?rev=1.1&content-type=text/x-cvsweb-markup)
nodeRecursiveunion.c (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeRecursiveunion.c?rev=1.1&content-type=text/x-cvsweb-markup)
nodeWorktablescan.c (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeWorktablescan.c?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/backend/parser:
parse_cte.c (r2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_cte.c?rev=2.1&content-type=text/x-cvsweb-markup)
pgsql/src/include/executor:
nodeCtescan.h (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/nodeCtescan.h?rev=1.1&content-type=text/x-cvsweb-markup)
nodeRecursiveunion.h (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/nodeRecursiveunion.h?rev=1.1&content-type=text/x-cvsweb-markup)
nodeWorktablescan.h (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/nodeWorktablescan.h?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/include/parser:
parse_cte.h (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_cte.h?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/test/regress/expected:
with.out (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/with.out?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/test/regress/sql:
with.sql (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/with.sql?rev=1.1&content-type=text/x-cvsweb-markup)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2008-10-05 14:20:03 | pgsql: Additional test coverage for boolean type (bool.c) |
Previous Message | Peter Eisentraut | 2008-10-04 13:55:45 | pgsql: Additional string function tests for coverage of oracle_compat.c |