Re: Commit every processed record - Mailing list pgsql-sql

From Craig Ringer
Subject Re: Commit every processed record
Date
Msg-id 47FA23EB.8060701@postnewspapers.com.au
Whole thread Raw
In response to Commit every processed record  ("luke\.78\@libero\.it" <luke.78@libero.it>)
List pgsql-sql
luke.78@libero.it wrote:
> Hi,
> I have to execute commit for evey record that i processed during a cursor fetch in a function.
> There is a way to do it?
>
>   
Sure. Do it outside PL/PgSQL, using a database client API like those 
available for Python, Java, Perl, etc.

If you really need to do it in PL/PgSQL, is there any reason you can't 
do all the work in one transaction and commit when the function finishes?

--
Craig Ringer


pgsql-sql by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Problem commit in function
Next
From: Tom Lane
Date:
Subject: Re: undefined relations in pg_locks