| От | Craig Ringer |
|---|---|
| Тема | Re: Using results from RETURNING |
| Дата | |
| Msg-id | 4A2A314E.80605@postnewspapers.com.au обсуждение |
| Ответ на | Using results from RETURNING ("Shak" <Shak@shak.com>) |
| Список | pgsql-general |
Shak wrote: > Something like: > > SELECT COUNT(*) FROM (DELETE FROM a RETURNING *) ; > > sounds reasonable but results in a syntax error. I am able to return > single results into a variable or record, but not more than one result. Subqueries using DELETE ... RETURNING or UPDATE ... RETURNING are not yet supported. Unfortunately. It'd be extremely useful in some situations, but it sounds like there are plenty of issues that make it less than trivial. > I could use a SELECT ... FOR UPDATE in the meantime, I just wanted to > know what the use of RETURNING * was if you can't do anything with the > results. You can use them in most situations other than subqueries. PL/PgSQL SELECT INTO, returning to the client, etc. Really handy. -- Craig Ringer
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера