• return query: Like return next, appends rows to the set of rows to be returned on exit.

  • The rows to be appended are the result of a query.

  • So why not just write the query? Or use a view?
    create view rich_account as select * from account where balance > 100;