Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sX6E2-001Yy3-0A for pgsql-docs@arkaria.postgresql.org; Thu, 25 Jul 2024 21:42:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sX6E0-001zuB-EW for pgsql-docs@arkaria.postgresql.org; Thu, 25 Jul 2024 21:42:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sX6E0-001zu2-1y for pgsql-docs@lists.postgresql.org; Thu, 25 Jul 2024 21:42:12 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sX6Dt-001RHE-Rt for pgsql-docs@lists.postgresql.org; Thu, 25 Jul 2024 21:42:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 46PLg3dV1566149; Thu, 25 Jul 2024 17:42:03 -0400 From: Tom Lane To: "David G. Johnston" cc: "masondeanm@aol.com" , "pgsql-docs@lists.postgresql.org" Subject: Re: INSERT ... RETURNING documentation In-reply-to: References: <172193970148.915373.2403176471224676074@wrigleys.postgresql.org> Comments: In-reply-to "David G. Johnston" message dated "Thu, 25 Jul 2024 14:27:08 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1566147.1721943723.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Thu, 25 Jul 2024 17:42:03 -0400 Message-ID: <1566148.1721943723@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Thursday, July 25, 2024, PG Doc comments form > 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