Re: undefined behaviour for sub-transactions?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: undefined behaviour for sub-transactions?
Дата
Msg-id 87vey8hewr.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: undefined behaviour for sub-transactions?  (Jaime Casanova <systemguards@gmail.com>)
Ответы Re: undefined behaviour for sub-transactions?  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: undefined behaviour for sub-transactions?  (Michael Fuhr <mike@fuhr.org>)
Re: undefined behaviour for sub-transactions?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Jaime Casanova <systemguards@gmail.com> writes:

> that is a mis-conception... a transaction *must* be atomic (all or nothing)...
> the reason some databases act that bad is because they don't support
> savepoints, and because postgres does it doesn't need that
> awfulness...

Well it's not as bad as all that. It's still "atomic" in that an interruption
cannot leave half of the transaction committed and half undone.

In other words "all" is just "all of the actions that didn't produce an
error". It's up to the client whether to commit the transaction after an error
has occurred.

It's great that Postgres follows the standard here, but don't go overboard on
the criticism of other databases either.

Where is Postgres at with psql using savepoints implicitly to wrap every
client command btw? My single biggest pet peeve with Postgres is that setting
autocommit off in psql is basically unusable because any typo forces you to
start your transaction all over again.

--
greg

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: help with utf8
Следующее
От: Philippe Ferreira
Дата:
Сообщение: Switchover : WAL archiving and shutdown...