pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Stuart <slim2k@privatejuris.org>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: UPDATE mentions the RETURNING * syntax but does not mention RETURNING * INTO ...
Date: Mon, 04 Sep 2023 17:00:13 -0400
Message-ID: <1198351.1693861213@sss.pgh.pa.us> (raw)
In-Reply-To: <117a4e32-a7d3-543e-b936-467b488981d4@privatejuris.org>
References: <117a4e32-a7d3-543e-b936-467b488981d4@privatejuris.org>

James Stuart <slim2k@privatejuris.org> 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-STATEMENTS-SQL-ONEROW

			regards, tom lane





view thread (2+ messages)

Message-ID: <1198351.1693861213@sss.pgh.pa.us>
Permalink:  ../1198351.1693861213@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1198351.1693861213@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, slim2k@privatejuris.org, pgsql-bugs@lists.postgresql.org
  Subject: Re: UPDATE mentions the RETURNING * syntax but does not mention RETURNING * INTO ...
  In-Reply-To: <1198351.1693861213@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox