Re: Document ordering guarantees on INSERT/UPDATE RETURNING clause - Mailing list pgsql-hackers

From Shay Rojansky
Subject Re: Document ordering guarantees on INSERT/UPDATE RETURNING clause
Date
Msg-id CADT4RqDXqwqTF6BAWw1oHf0PGKKwi2=HS19WNGZ6mSRHCLG1ng@mail.gmail.com
Whole thread Raw
In response to Re: Document ordering guarantees on INSERT/UPDATE RETURNING clause  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-hackers

> > > That seems very reasonable; if the situation is similar on PostgreSQL,
> > > then I'd suggest making that very clear in the INSERT[2] and UPDATE[3] docs.
> >
> > There is clearly no mention of such a guarantee in our documentation.
>
> Yes, which is just how SQL works: a set doesn't have any ordering unless an
> explicit one has been defined, RETURNING is no exception to that.

Thanks for confirming that such a guarantee doesn't exist. I would still suggest explicitly calling that out in the docs around RETURNING, since that seems like an understand pitfall; personally-speaking, this certainly wasn't clear to me when first looking at it (even if it is now).

 

pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
Next
From: Magnus Hagander
Date:
Subject: Re: Reducing power consumption on idle servers