Return Types

A function can return a value that can be a scalar value (either a single value, such as an integer, or a tuple-like complex type) or a results set (such as all the tuples from a table). The return type of a function is specified by the RETURNS keyword, followed by the type of the return value. If the return type is a result set, the RETURNS SETOF keyword must be used before the tuple type. If a function does not return any value at all, the void special placeholder must be used as the returned type.