Re: Document ordering guarantees on INSERT/UPDATE RETURNING clause

From: Shay Rojansky <roji(at)roji(dot)org>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Document ordering guarantees on INSERT/UPDATE RETURNING clause
Date: 2022-02-26 16:51:25
Message-ID: CADT4RqDXqwqTF6BAWw1oHf0PGKKwi2=HS19WNGZ6mSRHCLG1ng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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).

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2022-02-26 17:14:56 Re: Reducing power consumption on idle servers
Previous Message Chapman Flack 2022-02-26 16:48:52 Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file