Re: Commit turns into rollback?
От | Tom Lane |
---|---|
Тема | Re: Commit turns into rollback? |
Дата | |
Msg-id | 28798.1142608067@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Commit turns into rollback? (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: Commit turns into rollback?
|
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes: > Am Freitag, 17. März 2006 13:03 schrieb Hannu Krosing: >> Or would you like a mode where you need explicitly send a ROLLBACK to >> get out ? > I faintly recall that this used to be the behavior. No, it never was like that, and I don't think we can change it without breaking an awful lot of stuff --- particularly psql scripts, which would basically be unable to do anything at all with such a definition. A script can't change its behavior depending on whether there was an error earlier. It would also move us further away from the SQL standard. The spec says that COMMIT ends the transaction, full stop, not "ends it only if you're not in an error state". Of course the spec hasn't got a notion of a transaction error state at all, but my point is that making COMMIT leave you in the broken transaction is not an improvement compliance-wise. I am surprised that the COMMIT reference page makes no mention of the point though. That needs to be fixed. regards, tom lane
В списке pgsql-hackers по дате отправления: