Re: Question on doc for RETURNING clause

2024-01-11 Thread Russell, John
> On Jan 11, 2024, at 12:43 PM, Tom Lane wrote: > > "Russell, John" writes: >> Hi, I was thinking of suggesting some doc clarifications and additional >> examples related to the RETURNING clause. Just a couple of questions first >> to see if my understanding is correct. > >> I was trying to

Re: Question on doc for RETURNING clause

2024-01-11 Thread Tom Lane
"Russell, John" writes: > Hi, I was thinking of suggesting some doc clarifications and additional > examples related to the RETURNING clause. Just a couple of questions first to > see if my understanding is correct. > I was trying to figure out what the precise “thing” is that comes back from a

Re: Question on doc for RETURNING clause

2024-01-11 Thread David G. Johnston
On Thu, Jan 11, 2024 at 11:55 AM Russell, John wrote: > ``` > postgres=> insert into generatedfields (x) values (0), (10), (100) order > by 2 desc returning id, x; > ERROR: ORDER BY position 2 is not in select list > LINE 1: ...eratedfields (x) values (0), (10), (100) order by 2 desc ret... >

Question on doc for RETURNING clause

2024-01-11 Thread Russell, John
Hi, I was thinking of suggesting some doc clarifications and additional examples related to the RETURNING clause. Just a couple of questions first to see if my understanding is correct. There’s the basic usage of the RETURNING clause, like is shown on the https://www.postgresql.org/docs/current