"P. Christeas" <x...@linux.gr> writes:
> It has been a fact that the RETURNING clause on an INSERT will return
> multiple rows with the same order as multiple VALUES have been fed.

> eg: INSERT INTO tbl1(code) VALUES ('abc'), ('def'), ('agh')
>            RETURNING id, code;

> is expected to yield:
>    id | code
>   -----------
>     1 | abc
>     2 | def
>     3 | agh

> Clarify that in the documentation, and also write a test case that will
> prevent us from breaking the rule in the future.

I don't believe this is a good idea in the slightest.  Yeah, the current
implementation happens to act like that, but there is no reason that we
should make it guaranteed behavior.  Nor is a regression test case going
to stop someone from changing it, anyway.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to