committing inside cursor loop - Mailing list pgsql-hackers

From Peter Eisentraut
Subject committing inside cursor loop
Date
Msg-id fc2707cd-8fd5-2f8c-8c25-316778a2ac70@2ndquadrant.com
Whole thread Raw
Responses Re: committing inside cursor loop  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: committing inside cursor loop  (Simon Riggs <simon@2ndquadrant.com>)
Re: committing inside cursor loop  (Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>)
List pgsql-hackers
Here is a patch that allows COMMIT inside cursor loops in PL/pgSQL.  As
alluded to in earlier threads, this is done by converting such cursors
to holdable automatically.  A special flag "auto-held" marks such
cursors, so we know to clean them up on exceptions.

This is currently only for PL/pgSQL, but the same technique could be
applied easily to other PLs.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [bug fix] Produce a crash dump before main() on Windows
Next
From: Craig Ringer
Date:
Subject: Re: [bug fix] Produce a crash dump before main() on Windows