| От | PG Doc comments form |
|---|---|
| Тема | Do blocks support transaction control? |
| Дата | |
| Msg-id | 166394003436.654.15293085988078557076@wrigleys.postgresql.org обсуждение исходный текст |
| Ответы |
Re: Do blocks support transaction control?
|
| Список | pgsql-docs |
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/14/sql-do.html Description: Apparently now DO blocks support COMMIT; - which make them more like procedures than functions. Tried it with: create table z (a int4, b int4); insert into z (a,b) select i, i from generate_Series(1,10) i; do $$ declare begin update z set b = 2; commit; perform pg_sleep(120); end; $$ language plpgsql; And while it was running, in another psql sessions, I: 1. could see b= 2 2. could update any of the rows in z. Is it documented anywhere? DO docs say that do is like function, which it doesn't seem to be?
В списке pgsql-docs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера