Re: BUG #3320: Error when using INSERT...RETURNING as a subquery
От | David Fetter |
---|---|
Тема | Re: BUG #3320: Error when using INSERT...RETURNING as a subquery |
Дата | |
Msg-id | 20070529165915.GA1912@fetter.org обсуждение исходный текст |
Ответ на | Re: BUG #3320: Error when using INSERT...RETURNING as a subquery (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: BUG #3320: Error when using INSERT...RETURNING as a subquery
|
Список | pgsql-bugs |
On Tue, May 29, 2007 at 09:41:38AM -0400, Tom Lane wrote: > "Jan Szumiec" <jan.szumie@infiniteloop.eu> writes: > > UPDATE items SET (type, post_id) = (INSERT INTO efforts (effort) VALUES > > (667) RETURNING 'Item', id) WHERE id = 1937 > > Sorry, RETURNING is only supported at the top level of a query. What would be involved with making this possible? What we have at the moment is a pretty clear POLA violation because unlike the rest of the row-returning objects (tables, views, SRFs and VALUES() clauses), only RETURNING can't be used in a subquery. Cheers, D -- David Fetter <david@fetter.org> http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
В списке pgsql-bugs по дате отправления: