1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

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.
This commit is contained in:
Tom Lane
2002-08-30 23:59:46 +00:00
parent 9c279355fb
commit 7bacf2befa
6 changed files with 113 additions and 74 deletions

View File

@@ -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.