Concept Flow - Returning modified rows with RETURNING
Start UPDATE/DELETE/INSERT
Modify rows in table
RETURNING clause activated?
No→No rows returned
Yes
Collect modified rows
Return rows to client
When you run an UPDATE, DELETE, or INSERT with RETURNING, the database modifies rows and then sends back the changed rows to you.