Can't SELECT from (INSERT ... RETURNING)

Поиск
Список
Период
Сортировка
От Nico Sabbi
Тема Can't SELECT from (INSERT ... RETURNING)
Дата
Msg-id 469E1E6E.3050404@officinedigitali.it
обсуждение исходный текст
Ответы Re: Can't SELECT from (INSERT ... RETURNING)  ("Merlin Moncure" <mmoncure@gmail.com>)
Список pgsql-general
I thought I could use the output of INSERT...RETURNING as a set of
tuples for a subquery,
but it seems it's not the case:

nb1=# select * from (insert into m(a) values(112) returning a);
ERROR:  syntax error at or near "into"
LINE 1: select * from (insert into m(a) values(112) returni...
                              ^

Is this a bug or it's not even supposed to work in theory?
Such a feature would be extremely useful to have.

P.S.
I know it's non-portable, but this is not a problem.

Thanks,

             Nico

В списке pgsql-general по дате отправления:

Предыдущее
От: Nico Sabbi
Дата:
Сообщение: REQUEST: option to auto-generate new sequences with CREATE TABLE (LIKE)
Следующее
От: David Fetter
Дата:
Сообщение: Re: REQUEST: option to auto-generate new sequences with CREATE TABLE (LIKE)