Re: rollback in C functions

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: rollback in C functions
Date: 2015-02-19 21:59:47
Message-ID: 54E65CD3.9020300@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Juan Pablo L 2015-02-19 22:02:55 Re: rollback in C functions
Previous Message Alvaro Herrera 2015-02-19 21:57:23 Re: rollback in C functions