On Mon, Mar 31, 2014 at 01:34:04PM -0700, David Johnston wrote:
>
> If order is an implicit property of the source data then you need to
> explicitly encode that order during (or before) import.
Sure, but the problem the OP had I thought was that the RETURNING
clause doesn't guarantee that the rows coming back are in the order
they were inserted. This is just a SQL thing. (I guess you could
ORDER BY the RETURNING clause, right?)
> There are numerous
> ways to implement such but except for extremely simple cases PostgreSQL will
> not do the appropriate thing automatically in the face of concurrency.
It _is_ doing the appropriate thing, though: this is SQL. The rows
aren't ordered unless you tell them to be.
A
--
Andrew Sullivan
ajs@crankycanuck.ca