Обсуждение: UPDATE mentions the RETURNING * syntax but does not mention RETURNING * INTO ...

Поиск
Список
Период
Сортировка

UPDATE mentions the RETURNING * syntax but does not mention RETURNING * INTO ...

От
James Stuart
Дата:

UPDATE mentions the RETURNING * syntax but does not mention RETURNING * INTO ...

https://www.postgresql.org/docs/15/sql-update.html

--
— James Stuart
 
This private communication and any attachment(s) are protected by the expectation of privacy and is for the sole use of the intended recipient and contains privileged and/or confidential information. No monitoring of my communication or other means of surveillance, electronic and otherwise, is permitted and I reserve all my rights, without recourse and without prejudice, nunc pro tunc.  I do not consent to anyone tampering with, altering, monitoring or delaying any incoming or outgoing communication.
 

Re: UPDATE mentions the RETURNING * syntax but does not mention RETURNING * INTO ...

От
Tom Lane
Дата:
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