RETURNING * is a clever way to do this. What is this * from affected_rows syntax you're using here? Any chance you have a link to the docs that describes this?
select *
from affected_rows
With some additional columns that happen to be provided by postgres and/or a parameter to the SQL statement.