Postgres PLpgSQL allows for RETURN NEXT and RETURN QUERY syntax in order to return multiple rows from a PLpgSQL set-returning function. See the section 43.6.1.2. RETURN NEXT And RETURN QUERY in the postgres docs: https://www.postgresql.org/docs/current/plpgsql-control-structures.html
This issue tracks implementing that syntax. This will likely require implementing a new relational operator, RelCase, which conditionally executes relational expressions. This is necessary because PLpgSQL control flow requires the ability to conditionally execute functions, and the current scalar Case operator cannot handle set-returning functions.
Postgres PLpgSQL allows for
RETURN NEXT
andRETURN QUERY
syntax in order to return multiple rows from a PLpgSQL set-returning function. See the section43.6.1.2. RETURN NEXT And RETURN QUERY
in the postgres docs: https://www.postgresql.org/docs/current/plpgsql-control-structures.htmlThis issue tracks implementing that syntax. This will likely require implementing a new relational operator,
RelCase
, which conditionally executes relational expressions. This is necessary because PLpgSQL control flow requires the ability to conditionally execute functions, and the current scalarCase
operator cannot handle set-returning functions.Jira issue: CRDB-28933