DECLARE CURSOR must not contain data-modifying statements in WITH
В списке pgsql-hackers по дате отправления:
| От | Andres Freund |
|---|---|
| Тема | DECLARE CURSOR must not contain data-modifying statements in WITH |
| Дата | |
| Msg-id | 201109211819.44027.andres@anarazel.de обсуждение исходный текст |
| Ответы |
Re: DECLARE CURSOR must not contain data-modifying
statements in WITH
|
| Список | pgsql-hackers |
Hi all,
Whats the reason for disallowing cursors on wCTEs? I am not sure I can follow
the comment:
/* * We also disallow data-modifying WITH in a cursor. (This could be * allowed, but the semantics of when the updates
occurmight be * surprising.) */if (result->hasModifyingCTE) ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("DECLARE CURSOR must not contain data-modifying
statements in WITH")));
Given that cursors are about the only sensible way to return larger amounts of
data, that behaviour reduces the usefulness of wCTEs a bit.
Whats the exact cause of concern here? I personally don't think there is a
problem documenting that you should fetch the cursor fully before relying on
the updated tables to be in a sensible state. But that may be just me.
Thanks,
Andres
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера