Re: Deletion - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Deletion
Date
Msg-id 53FF4057.4010408@aklaver.com
Whole thread Raw
In response to Re: Deletion  (Ramesh T <rameshparnanditech@gmail.com>)
List 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.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Deletion
Next
From: "Yogesh. Sharma"
Date:
Subject: Re: Help related to Postgresql for RHEL 6.5