Re: BUG #1550: LOCK TABLE in plpgsql function doesn't work.
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #1550: LOCK TABLE in plpgsql function doesn't work. |
| Дата | |
| Msg-id | 3491.1111126627@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #1550: LOCK TABLE in plpgsql function doesn't work. ("Spencer Riddering" <spencer@riddering.net>) |
| Список | pgsql-bugs |
"Spencer Riddering" <spencer@riddering.net> writes:
> When a LOCK TABLE statement is included in a plpgsql function it does not
> actually lock the table.
Sure it does. If it doesn't, your test case surely will not prove it;
you cannot prove the existence or lack of existence of a lock in a test
case with only one connection...
I suspect your complaint really has to do with the fact that the
transaction snapshot is established before the function is entered,
and thus before the lock is taken. Pre-8.0, we did not advance the
snapshot within functions, and so the commands within the function
would all see a snapshot that predated the obtaining of the lock.
Short answer: try 8.0.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера