Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK
Дата
Msg-id 24445.1098908513@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Oliver Elphick wrote:
>> On Tue, 2004-10-26 at 21:42 -0400, Bruce Momjian wrote:
>>> test=> begin;
>>> BEGIN
>>> test=> commit;
>>> COMMIT
>>> test=> commit;
>>> WARNING:  there is no transaction in progress
>>> ROLLBACK
>> 
>> It's still a misleading message; in those circumstances, how about
>> returning "NO ACTION" instead?

> Uh, it took a lot of discussion to agree on ROLLBACK.  It would take
> even more discussion to add a new tag return value.

I don't care for "NO ACTION" either.  However, the prior discussion had
to do with what to echo in the case that you are saying COMMIT in a
failed transaction.  I don't think anyone thought about this particular
corner case, viz COMMIT outside any transaction.  I think you could make
a reasonable argument that the tag should remain COMMIT for this case,
since we do not consider it an error.

On the other hand, it's also a pretty minor issue, and if it turns out
to require a lot of code rejiggering to make it do that, I'd not think
it worthwhile.

Comments?
        regards, tom lane


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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Should bgwriter log checkpoint start/end?
Следующее
От: ohp@pyrenet.fr
Дата:
Сообщение: Re: Unixware 714 pthreads