Re: FATAL: ReleaseSavepoint: unexpected state STARTED

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: FATAL: ReleaseSavepoint: unexpected state STARTED
Дата
Msg-id 21826.1313782300@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: FATAL: ReleaseSavepoint: unexpected state STARTED  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: FATAL: ReleaseSavepoint: unexpected state STARTED  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I spent some time looking at this afternoon and it appears that the
> root of this problem is that we're a bit schizophrenic about whether a
> multi-query command string constitutes a transaction or not.

Yeah.  The current behavior sort of automatically adds a BEGIN and a
COMMIT around the string, but it's evidently not tied into the real
BEGIN and COMMIT commands well enough.

> As for ROLLBACK, I think it should chuck an error instead of doing
> this funny emit-a-warning-and-silently-arrange-for-the-transaction-to-be-aborted-later
> thing.

I'm pretty unexcited about changing the behavior of established
mainstream cases just so that we can throw slightly-more-meaningful
errors in the psql -c case.  ROLLBACK when not in a transaction is not
an error, only a NOTICE, and it should stay that way.  If you change
that there are going to be a lot of application and driver authors on
your doorstep with the usual equipment.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: FATAL: ReleaseSavepoint: unexpected state STARTED
Следующее
От: Robert Haas
Дата:
Сообщение: Re: the big picture for index-only scans