Re: BEGIN inside transaction should be an error
| От | Tom Lane |
|---|---|
| Тема | Re: BEGIN inside transaction should be an error |
| Дата | |
| Msg-id | 26899.1147241958@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | BEGIN inside transaction should be an error (Dennis Bjorklund <db@zigo.dhs.org>) |
| Ответы |
Re: BEGIN inside transaction should be an error
Re: BEGIN inside transaction should be an error Re: BEGIN inside transaction should be an error Re: BEGIN inside transaction should be an error |
| Список | pgsql-hackers |
Dennis Bjorklund <db@zigo.dhs.org> writes:
> Yesterday I helped a guy on irc with a locking problem, he thought
> that locking in postgresql was broken. It turned out that he had a PHP
> function that he called inside his transaction and the function did BEGIN
> and COMMIT. Since BEGIN inside a transaction is just a warning what
> happend was that the inner COMMIT ended the transaction and
> released the locks. The rest of his commands ran with autocommit
> and no locks and he got broken data into the database.
> Could we make BEGIN fail when we already are in a transaction?
We could, but it'd probably break about as many apps as it fixed.
I wonder whether php shouldn't be complaining about this, instead
--- doesn't php have its own ideas about controlling where the
transaction commit points are?
regards, tom lane
В списке pgsql-hackers по дате отправления: