summaryrefslogtreecommitdiff
path: root/src/backend/utils/fmgr
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-10-31 19:37:56 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-10-31 19:37:56 +0000
commit9b46abb7c47de8aa408a8c83666fd67c5447eb85 (patch)
tree034991f27008de03ff71f505431b10a1b2ae5e5e /src/backend/utils/fmgr
parentcd97f98844b5640b1cdc701c691c962155dce3b4 (diff)
downloadpostgresql-9b46abb7c47de8aa408a8c83666fd67c5447eb85.tar.gz
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.
Diffstat (limited to 'src/backend/utils/fmgr')
-rw-r--r--src/backend/utils/fmgr/README6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/utils/fmgr/README b/src/backend/utils/fmgr/README
index 7c1ccc5bf8..c2624ee475 100644
--- a/src/backend/utils/fmgr/README
+++ b/src/backend/utils/fmgr/README
@@ -1,4 +1,4 @@
-$PostgreSQL: pgsql/src/backend/utils/fmgr/README,v 1.15 2008/10/29 00:00:38 tgl Exp $
+$PostgreSQL: pgsql/src/backend/utils/fmgr/README,v 1.16 2008/10/31 19:37:56 tgl Exp $
Function Manager
================
@@ -434,7 +434,9 @@ and returns null. isDone is not used and should be left at ExprSingleResult.
The Tuplestore must be created with randomAccess = true if
SFRM_Materialize_Random is set in allowedModes, but it can (and preferably
-should) be created with randomAccess = false if not.
+should) be created with randomAccess = false if not. Callers that can support
+both ValuePerCall and Materialize mode will set SFRM_Materialize_Preferred,
+or not, depending on which mode they prefer.
If available, the expected tuple descriptor is passed in ReturnSetInfo;
in other contexts the expectedDesc field will be NULL. The function need