Commit within a PL/PGSQL procedure - Mailing list pgsql-novice

From Harry Broomhall
Subject Commit within a PL/PGSQL procedure
Date
Msg-id 200306171408.PAA61867@haeb.noc.uk.easynet.net
Whole thread Raw
Responses Re: Commit within a PL/PGSQL procedure  (Josh Berkus <josh@agliodbs.com>)
List pgsql-novice
   I am trying to develop a special function to read an entire database
and create a new database from it according to various complicated rules.

   Now I could use Perl or similar to do this, but I was under the
impression that doing it on "the backend" in PL/PGSQL was the most efficient.

   The problem I have come up against is that such a function is treated
as a single transaction, so if the database is large the memory gets
eaten up before it finishes.

   I'm told that in the Oracle equivalent system one can insert COMMIT
statements to aleviate the problem.

   Is there any way under PgSQL to do the same?  Or is there some other
'trick' to achieve this?

   Regards,
       Harry.


pgsql-novice by date:

Previous
From: Rory Campbell-Lange
Date:
Subject: Re: use cursor in a function
Next
From: Josh Berkus
Date:
Subject: Re: Commit within a PL/PGSQL procedure