Re: [HACKERS] Define and document a guaranteed ordering for RETURNING?

2015-01-14 Thread Craig Ringer
Apparently I'm semi-blind - the docs also note that: > 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 by the command. ... so perhaps it's

[HACKERS] Define and document a guaranteed ordering for RETURNING?

2015-01-14 Thread Craig Ringer
Hi all It's recently occurred to me that many people rely on the RETURNING clause for multi-valued INSERTs, INSERT INTO ... SELECT, etc, returning rows in the same order they were supplied as input into the INSERT. I often see lock-step iteration over the inputs to an INSERT and the RETURNING resu