Re: Deletion

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Ramesh T <rameshparnanditech(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Deletion
Date: 2014-08-28 14:44:39
Message-ID: 53FF4057.4010408@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/28/2014 04:22 AM, Ramesh T wrote:
> OK.. i created a function for delete customer from different tables in
> single database.
>
> i want rollback..
>
> my question:
> where i need to place rollback ,with in a
> function along with deletion statements..? or after run the function ..?
> i do not need commit..

Realized in my last post the below was not entirely clear:

"If you want to invoke an explicit ROLLBACK then you will need an
explicit BEGIN, which means you will need an explicit COMMIT to have the
operation succeed. "

should have been:

If you want to invoke an explicit ROLLBACK when you have a error then
you will need an explicit BEGIN, which means you will need an explicit
COMMIT when the operation succeeds in order for the transaction to
complete.

> please let me know..

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Yogesh. Sharma 2014-08-29 03:06:51 Re: Help related to Postgresql for RHEL 6.5
Previous Message Adrian Klaver 2014-08-28 14:35:25 Re: Deletion