From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: committing inside cursor loop |
Date: | 2018-02-20 14:45:48 |
Message-ID: | 17538.1519137948@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> 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.
I haven't really read this patch, but this bit jumped out at me:
+ Inside a cursor loop, <command>ROLLBACK</command> is not allowed. (That
+ would have to roll back the cursor query, thus invalidating the loop.)
Say what? That seems to translate into "we have lost the ability to
deal with errors". I don't think this is really what people are hoping
to get out of the transactional-procedure facility.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Aleksander Alekseev | 2018-02-20 15:08:38 | [PATCH] Add a few suppression rules for Valgrind |
Previous Message | Matheus de Oliveira | 2018-02-20 14:34:47 | [PATCH] btree_gin, add support for uuid, bool, name, bpchar and anyrange types |