Re: Commit turns into rollback?

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема Re: Commit turns into rollback?
Дата
Msg-id e51f66da0603170750x11b58ec5sda1a946b14d5ddb6@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Commit turns into rollback?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 3/17/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > The standard does address the issue of transactions that cannot be committed
> > because of an error.  In 16.6. <commit statement> GR 6 it basically says that
> > if the transaction cannot be completed (here: because of a constraint
> > violation), then an exception condition should be raised.  That is, the
> > transaction is over but you get an error.  I think that behavior would be
> > better.
>
> So it's not the fact that it rolls back that bugs you, it's the way that
> the action is reported?  We could talk about changing that maybe --- it
> wouldn't break existing scripts AFAICS.  It might break applications
> though.

Error means the actual command failed.  _Doing_ something, successfully,
and still reporting error seems rather wrong.

IMHO only other behaviour than current one that is not broken
is requiring ROLLBACK for failed transactions.  And that is no good
for backwards-compatibility reasons.

So -1 for changing anything.

--
marko


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Commit turns into rollback?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Seperate command-line histories for seperate databases