From: Craig Ringer <craig@postnewspapers.com.au>
To: luke.78@libero.it <luke.78@libero.it>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Commit every processed record
Date: Mon, 07 Apr 2008 21:38:51 +0800
Message-ID: <47FA23EB.8060701@postnewspapers.com.au> (raw)
In-Reply-To: <JYYGU2$97AF5EA2BC5DE2EE89FD98FE634DE055@libero.it>
References: <JYYGU2$97AF5EA2BC5DE2EE89FD98FE634DE055@libero.it>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: craig@postnewspapers.com.au, luke.78@libero.it
Subject: Re: Commit every processed record
In-Reply-To: <47FA23EB.8060701@postnewspapers.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox