Bruce Momjian wrote:
> I am going to work on nested transactions for 7.4.
> 
> My goal is to first implement nested transactions:
> 
>       BEGIN;
>       SELECT ...
>       BEGIN;
>       UPDATE;
>       COMMIT;
>       DELETE;
>       COMMIT;
> 
> and later savepoints (Oracle):
> 
> 
>       BEGIN;
>       SELECT ...
>       SAVEPOINT t1;
>       UPDATE;
>       SAVEPOINT t2;
>       DELETE;
>       ROLLBACK TO SAVEPOINT t2;
>       COMMIT;
> 
> I assume people want both.

Yep.

My question is: how do you see cursors working with nested
transactions?

Right now you can't do cursors outside of transactions.
Subtransactions would complicate things a bit:

BEGIN;
DECLARE CURSOR x ...
BEGIN
(is cursor x visible here?  What are the implications of using it if
it is?)
...
COMMIT;
...
COMMIT;


Would we only allow cursors within the innermost transactions?  If we
allow them anywhere else, why retain the requirement that they be used
within transactions at all?


-- 
Kevin Brown                                           [EMAIL PROTECTED]

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to