RETURNING order guarantees documentation

From: Dan Wainwright <danw(dot)cobus(at)gmail(dot)com>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: RETURNING order guarantees documentation
Date: 2024-05-04 17:12:47
Message-ID: CACTd0ws66eB=Nepy4nx3sr+fCdffVVgqd7KhYAxs+PR6HMo_=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hi, I was looking for documentation on the ordering guarantees of RETURNING
statements relative to the input data and found that there is nothing
explicit.

The insert docs state
> 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 or updated
by the command.

'Similar to' doesn't provide anything concrete to the reader. There
was a thread
on [Hackers]
<https://www.mail-archive.com/pgsql-hackers(at)postgresql(dot)org/msg253743.html>
back in 2015 proposing some docs to clearly explain that ordering is
preserved and I am keen to write the documentation if it's agreed to be
worth doing.

Thanks, Dan

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2024-05-04 17:29:04 Re: RETURNING order guarantees documentation
Previous Message Phil Eaton 2024-05-03 17:35:31 Re: Add minimal C example and SQL registration example for custom table access methods.