summaryrefslogtreecommitdiff
path: root/src/backend/utils/fmgr
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-08-30 23:59:46 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-08-30 23:59:46 +0000
commit7bacf2befaa5e708ad924dfc7f37844a0013e06f (patch)
tree30d436a390835bd49d0be011b2d9e2dbc843ed97 /src/backend/utils/fmgr
parent9c279355fbf332dbf6dcebbe10d38e10503bf4dd (diff)
downloadpostgresql-7bacf2befaa5e708ad924dfc7f37844a0013e06f.tar.gz
Add expected tuple descriptor to ReturnSetInfo information for table
functions, per suggestion from John Gray and Joe Conway. Also, fix plpgsql RETURN NEXT to verify that returned values match the expected tupdesc.
Diffstat (limited to 'src/backend/utils/fmgr')
-rw-r--r--src/backend/utils/fmgr/README5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/utils/fmgr/README b/src/backend/utils/fmgr/README
index 98d4e7bd51..3ffc4dddd0 100644
--- a/src/backend/utils/fmgr/README
+++ b/src/backend/utils/fmgr/README
@@ -423,6 +423,11 @@ 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;
+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.
+
There is no support for functions accepting sets; instead, the function will
be called multiple times, once for each element of the input set.