Re: INSERT ... RETURNING documentation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "masondeanm(at)aol(dot)com" <masondeanm(at)aol(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: INSERT ... RETURNING documentation
Date: 2024-07-25 21:42:03
Message-ID: 1566148.1721943723@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Thursday, July 25, 2024, PG Doc comments form <noreply(at)postgresql(dot)org>
> wrote:
>> The grammar
>> [ RETURNING * | output_expression [ [ AS ] output_name ] [, ...] ]
>> seems wrong to me.

> Yes, the word returning makes it the returning clause. This should be
> written:

> [ Returning { * | output_expression [ [ AS ] output_name ] } [, …] ]

Agreed.

> Related, select says:

> [ * | expression [ [ AS ] output_name ] [, …] ]

I imagine the RETURNING synopsis was copied from that one :-(
Yes, let's change that too.

regards, tom lane

In response to

Browse pgsql-docs by date

  From Date Subject
Previous Message David G. Johnston 2024-07-25 21:27:08 Re: INSERT ... RETURNING documentation