Commit within a PL/PGSQL procedure

From: Harry Broomhall <harry(dot)broomhall(at)uk(dot)easynet(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Commit within a PL/PGSQL procedure
Date: 2003-06-17 14:08:08
Message-ID: 200306171408.PAA61867@haeb.noc.uk.easynet.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2003-06-17 15:40:56 Re: Commit within a PL/PGSQL procedure
Previous Message Rory Campbell-Lange 2003-06-17 12:34:21 Re: use cursor in a function