Re: rollback in C functions - Mailing list pgsql-general

From John R Pierce
Subject Re: rollback in C functions
Date
Msg-id 54E65CD3.9020300@hogranch.com
Whole thread Raw
In response to Re: rollback in C functions  (Juan Pablo L <jpablolorenzetti@gmail.com>)
List pgsql-general
On 2/19/2015 1:41 PM, Juan Pablo L wrote:
> Hi, i want previous updates to rollback ... like nothing happened (a
> normal begin/rollback behaviour)

so thrown an exception.   The actual rollback has to be invoked by the
client application program, which should catch the error thrown by the
query that causes the exception.   In pl/pgsql this would be easy, RAISE
SQLSTATE 'string';  but i'm not sure how you'd do this in a C function.


--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: rollback in C functions
Next
From: Juan Pablo L
Date:
Subject: Re: rollback in C functions