Re: storing intermediate results in recursive plpgsql functions
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: storing intermediate results in recursive plpgsql functions |
| Дата | |
| Msg-id | 16694.1015349838@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: storing intermediate results in recursive plpgsql (Vince Vielhaber <vev@michvhf.com>) |
| Список | pgsql-general |
Vince Vielhaber <vev@michvhf.com> writes:
> So if the function is executed in a transaction and the transaction
> ends when the function does, doesn't that mean the lock is released
> when the function ends?
But the transaction *doesn't* end when the function does.
The function must have been called from some SQL query (eg, a SELECT)
and there is an explicit or implicit transaction wrapped around every
query issued by an application. The earliest the lock can possibly be
released is when the current application-given query ends. If the query
is inside an explicit BEGIN/COMMIT block then the lock will be held till
you COMMIT or ROLLBACK.
Feel free to propose better wording for that part of the plpgsql docs...
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера