Hi, I was looking for documentation on the ordering guarantees of RETURNING statements relative to the input data and found that there is nothing explicit.
The insert docs state
> If the INSERT command contains a RETURNING clause, the result will be similar to that of a SELECT statement containing the columns and values defined in the RETURNING list, computed over the row(s) inserted or updated by the command.
'Similar to' doesn't provide anything concrete to the reader. There was a
thread on [Hackers] back in 2015 proposing some docs to clearly explain that ordering is preserved and I am keen to write the documentation if it's agreed to be worth doing.
Thanks, Dan