From e3e3d2a789e34ff6572bdf693beb1516a228c5ff Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 28 Oct 2008 22:02:06 +0000 Subject: Extend ExecMakeFunctionResult() to support set-returning functions that return via a tuplestore instead of value-per-call. Refactor a few things to reduce ensuing code duplication with nodeFunctionscan.c. This represents the reasonably noncontroversial part of my proposed patch to switch SQL functions over to returning tuplestores. For the moment, SQL functions still do things the old way. However, this change enables PL SRFs to be called in targetlists (observe changes in plperl regression results). --- src/backend/utils/fmgr/README | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/backend/utils/fmgr') diff --git a/src/backend/utils/fmgr/README b/src/backend/utils/fmgr/README index 7cdb69418c..ccf911e62e 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.13 2008/05/15 00:17:40 tgl Exp $ +$PostgreSQL: pgsql/src/backend/utils/fmgr/README,v 1.14 2008/10/28 22:02:05 tgl Exp $ Function Manager ================ @@ -432,8 +432,7 @@ function is called in). The function stores pointers to the Tuplestore and TupleDesc into ReturnSetInfo, sets returnMode to indicate materialize mode, and returns null. isDone is not used and should be left at ExprSingleResult. -If the function is being called as a table function (ie, it appears in a -FROM item), then the expected tuple descriptor is passed in ReturnSetInfo; +If available, the expected tuple descriptor is passed in ReturnSetInfo; in other contexts the expectedDesc field will be NULL. The function need not pay attention to expectedDesc, but it may be useful in special cases. -- cgit v1.2.1