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 1qdGgH-002mTg-M1 for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Sep 2023 21:00:21 +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 1qdGgG-00EODV-9K for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Sep 2023 21:00:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdGgG-00EODN-08 for pgsql-bugs@lists.postgresql.org; Mon, 04 Sep 2023 21:00:19 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdGgB-0033q6-Kg for pgsql-bugs@lists.postgresql.org; Mon, 04 Sep 2023 21:00:19 +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 384L0D7d1198352; Mon, 4 Sep 2023 17:00:14 -0400 From: Tom Lane To: James Stuart cc: pgsql-bugs@lists.postgresql.org Subject: Re: UPDATE mentions the RETURNING * syntax but does not mention RETURNING * INTO ... In-reply-to: <117a4e32-a7d3-543e-b936-467b488981d4@privatejuris.org> References: <117a4e32-a7d3-543e-b936-467b488981d4@privatejuris.org> Comments: In-reply-to James Stuart message dated "Mon, 04 Sep 2023 10:55:05 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1198350.1693861213.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 04 Sep 2023 17:00:13 -0400 Message-ID: <1198351.1693861213@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk James Stuart writes: > UPDATE mentions the RETURNING * syntax but does not mention RETURNING * = > INTO ... > https://www.postgresql.org/docs/15/sql-update.html That's because there is no such thing so far as the core SQL parser is concerned (so if you try it from, say, psql, it won't work). There is such syntax in plpgsql, and that's where it's documented: https://www.postgresql.org/docs/current/plpgsql-statements.html#PLPGSQL-ST= ATEMENTS-SQL-ONEROW regards, tom lane