Database Reference
In-Depth Information
Summary of RETURN SETOF variants
We learned that you can return table-like data sets from a function using one of the
following:
RETURNS
...
INSIDE func-
tion
RECORD structure
From type definition
DECLARE row
variable of
ROW or
RECORD type
SETOF
<type>
ASSIGN to row
variable
RETURN
NEXT var;
Same as table or view structure
SETOF
<table/
view>
Dynamic, using AS (name type, …) at call site
SETOF
RECORD
Using OUT and INOUT function arguments. Assign to
OUT variables.
SETOF
RECORD
RETURN NEXT ;
Search WWH ::




Custom Search