The following bug has been logged on the website:
Bug reference: 13967
Logged by: Iurii Popov
Email address: iurii(dot)i(dot)popov(at)gmail(dot)com
PostgreSQL version: 9.5.1
Operating system: Ubuntu
Description:
At
http://www.postgresql.org/docs/9.5/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN
you can see
If multiple rows are returned, only the first will be assigned to the INTO
variable.
It will be useful to write information from (or a link to)
http://www.postgresql.org/docs/9.5/static/plpgsql-control-structures.html#AEN62513
about RETURN QUERY EXECUTE statement to return set of rows.