cannot use result of (insert .. returning)

Поиск
Список
Период
Сортировка
От dvs
Тема cannot use result of (insert .. returning)
Дата
Msg-id 01ae01c8c153$3b40fbe0$0e09a8c0@dvs
обсуждение исходный текст
Список pgsql-ru-general
Hello,

I need to use query like:
    select (insert into test (a) values (x) returning b),...
but it say
    ERROR: syntax error at or near "into"

Is this a bug?

Function does not work too:
  create function(..) returning .. as 'insert ... returning ..' language
'sql'
ERROR:...
DETAIL: Function's final statement must be a SELECT.

any ideas?

dvs


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

Предыдущее
От: "pronix pronix"
Дата:
Сообщение: ограничение пользователя постгреса
Следующее
От: apm
Дата:
Сообщение: Не используется индекс в запросе.