Re: Reg: PL/pgSQL commit and rollback

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Medhavi Mahansaria <medhavi(dot)mahansaria(at)tcs(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Reg: PL/pgSQL commit and rollback
Date: 2015-03-17 14:51:26
Message-ID: CAF-3MvNd2K3ted6D16EKgJQi0uBrK9WXDr_hjis0iNu9XdEKDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 17 March 2015 at 15:30, Medhavi Mahansaria
<medhavi(dot)mahansaria(at)tcs(dot)com> wrote:
> Yes. I have read this document.
>
> But my issue is that even when it throws and exception I need to rollback
> the changes made by that query and move on to the next block.
>
> Is there any way to accomplish that?

Please do not toppost on this list.

The solution is to do what Albe explained: use BEGIN ... EXCEPTION ...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-03-17 14:51:56 Re: Reg: PL/pgSQL commit and rollback
Previous Message Medhavi Mahansaria 2015-03-17 14:30:11 Re: Reg: PL/pgSQL commit and rollback