| От | dvs |
|---|---|
| Тема | cannot use result of (insert..returning) |
| Дата | |
| Msg-id | 006e01c8c603$5ca703b0$0e09a8c0@dvs обсуждение исходный текст |
| Ответы |
Re: cannot use result of (insert..returning)
|
| Список | pgsql-hackers |
Hello, I need to use query like: select (insert into test (a) values (x) returning b),c from anytable where condition but it say ERROR: syntax error at or near "into" Is this a bug? Function does not work too: create function addt(..) returning .. as 'insert ... returning ..' language 'sql' ERROR:... DETAIL: Function's final statement must be a SELECT. BUT: create function addt(..) returning .. as 'insert...(nextval(..)...);select currval(..)' language 'sql' work in select addt(x),c from anytable where condition but this function is analog of "insert...returning" in any case Why analog work "better" then original? What is my mistake? (I dont want use functions here!) dvs
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера