Re: commit within function - Mailing list pgsql-admin

From Scott Marlowe
Subject Re: commit within function
Date
Msg-id dcc563d10907161203g51e2443ct3f0abf7ad9a9f977@mail.gmail.com
Whole thread Raw
In response to commit within function  (Anj Adu <fotographs@gmail.com>)
List pgsql-admin
On Thu, Jul 16, 2009 at 11:30 AM, Anj Adu<fotographs@gmail.com> wrote:
> I need an explicit commit...i.e i need func B's results to be
> available to other transactions when I enter func C
>
> So...what you are saying is..in Func c
>
> BEGIN
>    simulate error
> EXCEPTION
>    WHEN condition [ OR condition ... ] THEN
>        do nothing;
> END;
>
> Will this cause the transaction to be committed upto the savepoint in
> the beginning of function C ?

The transaction will be committed or not as a whole.  That's how
transactions work.  If you need part of the data so far processed
committed then you need to commit the transaction and start a new one.

pgsql-admin by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: user connection properties
Next
From: Scott Marlowe
Date:
Subject: Re: PostgreSQL using 100% CPU