Re: transaction management in plpgsql functions
От | Chester Kustarz |
---|---|
Тема | Re: transaction management in plpgsql functions |
Дата | |
Msg-id | Pine.BSO.4.44.0311091613150.19584-100000@detroit.arbor.net обсуждение исходный текст |
Ответ на | transaction management in plpgsql functions (Cris Carampa <cris119@operamail.com>) |
Список | pgsql-sql |
http://www.postgresql.org/docs/7.2/interactive/plpgsql-structure.html "It is important not to confuse the use of BEGIN/END for grouping statements in PL/pgSQL with the database commands for transactioncontrol. PL/pgSQL's BEGIN/END are only for grouping; they do not start or end a transaction. Functions and triggerprocedures are always executed within a transaction established by an outer query --- they cannot start or committransactions, since PostgreSQL does not have nested transactions." Makes sense if you think about it. On Thu, 6 Nov 2003, Cris Carampa wrote: > It seems that transaction management statements (begin work...commit > work) are not allowed into plpgsql functions. Is it true? If true, what > happens if I put a DML statement into a function? Is it automatically > commited every time the function executes? Is there no way to rollback > the changes?
В списке pgsql-sql по дате отправления: