From: | Juan Pablo L <jpablolorenzetti(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: rollback in C functions |
Date: | 2015-02-19 22:02:55 |
Message-ID: | CABSYDabOMzOse4QXZLMtOsSequgBNxPOJVOcYpTXWukdHdu1Yg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you Alvaro, i m afraid ereport seems to be the way, that it is
complicated to catch this error code in the code of the caller. cause you
have to use a callback etc etc
On 19 February 2015 at 15:57, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:
> 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2015-02-19 22:22:15 | Re: rollback in C functions |
Previous Message | John R Pierce | 2015-02-19 21:59:47 | Re: rollback in C functions |