Re: Error on failed COMMIT

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Error on failed COMMIT
Дата
Msg-id CA+TgmoaSJ_oGvMjDZqzp2mQHtdzRoywqYpOp+UTHq7tu9so9NA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Error on failed COMMIT  (Dave Cramer <davecramer@postgres.rocks>)
Ответы Re: Error on failed COMMIT  (Dave Cramer <davecramer@postgres.rocks>)
Список pgsql-hackers
On Fri, Feb 14, 2020 at 1:04 PM Dave Cramer <davecramer@postgres.rocks> wrote:
> Thing is that con.commit() DOESN'T return a status code, nor does it throw an exception as we silently ROLLBACK
here.

Why not? There's nothing keeping the driver from doing either of those
things, is there? I mean, if using libpq, you can use PQcmdStatus() to
get the command tag, and find out whether it's COMMIT or ROLLBACK. If
you're implementing the wire protocol directly, you can do something
similar.

https://www.postgresql.org/docs/current/libpq-exec.html#LIBPQ-EXEC-NONSELECT

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Moving relation extension locks out of heavyweightlock manager
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager