Re[2]: Mention RETURNING ... INTO target
От | Stefan Schmiedl |
---|---|
Тема | Re[2]: Mention RETURNING ... INTO target |
Дата | |
Msg-id | em5730003d-f62e-442f-887c-b340b57309a5@89ddd194.com обсуждение исходный текст |
Ответ на | Re: Mention RETURNING ... INTO target (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-docs |
To "David G. Johnston" <david.g.johnston@gmail.com>
Cc s@xss.de; "Pg Docs" <pgsql-docs@lists.postgresql.org>
Date 07.06.2022 23:07:30
Subject Re: Mention RETURNING ... INTO target
"David G. Johnston" <david.g.johnston@gmail.com> writes:On Tue, Jun 7, 2022 at 1:30 PM PG Doc comments form <noreply@postgresql.org>wrote:It looks like INSERT INTO ... RETURNING allows defining a target for thereturned values like SELECT ... INTO does.That isn't how it works. RETURNING simply turns INSERT into a result setproducing SQL Command. And SQL doesn't have a concept of "target"(variables) in the sense you are thinking. pg/pgsql does, allowing resultset data to be placed into variables.Right. And in fact this *is* documented in the context of pl/pgsql:regards, tom lane
"single-row results" when looking for an assumed option of "INSERT".
s.
В списке pgsql-docs по дате отправления: