]> granicus.if.org Git - postgresql/commit
Allow SQL-language functions to return the output of an INSERT/UPDATE/DELETE
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 31 Oct 2008 19:37:56 +0000 (19:37 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 31 Oct 2008 19:37:56 +0000 (19:37 +0000)
commit9b46abb7c47de8aa408a8c83666fd67c5447eb85
tree034991f27008de03ff71f505431b10a1b2ae5e5e
parentcd97f98844b5640b1cdc701c691c962155dce3b4
Allow SQL-language functions to return the output of an INSERT/UPDATE/DELETE
RETURNING clause, not just a SELECT as formerly.

A side effect of this patch is that when a set-returning SQL function is used
in a FROM clause, performance is improved because the output is collected into
a tuplestore within the function, rather than using the less efficient
value-per-call mechanism.
doc/src/sgml/xfunc.sgml
src/backend/executor/execQual.c
src/backend/executor/functions.c
src/backend/tcop/dest.c
src/backend/utils/fmgr/README
src/include/executor/functions.h
src/include/nodes/execnodes.h
src/include/tcop/dest.h
src/test/regress/expected/rangefuncs.out
src/test/regress/output/create_function_1.source
src/test/regress/sql/rangefuncs.sql