Re: rollback in C functions

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: rollback in C functions
Дата
Msg-id 20150219215723.GM2500@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: rollback in C functions  (Juan Pablo L <jpablolorenzetti@gmail.com>)
Ответы Re: rollback in C functions  (Juan Pablo L <jpablolorenzetti@gmail.com>)
Список pgsql-general
Juan Pablo L wrote:
> Hi, i want previous updates to rollback ... like nothing happened (a normal
> begin/rollback behaviour)

Ah, so ereport() is exactly what you want, like Chris Mair said.
Assuming you wrote it correctly, you should see the ERROR line in the
server logs (set log_message_verbosity=verbose in postgresql.conf to see
the full details such as the sqlstate etc).  Did you notice you must add
an extra ( before errmsg and other sub-calls within the ereport call?

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Juan Pablo L
Дата:
Сообщение: Re: rollback in C functions
Следующее
От: John R Pierce
Дата:
Сообщение: Re: rollback in C functions