From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
Cc: | Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [subxacts] Savepoint syntax |
Date: | 2004-07-27 05:22:55 |
Message-ID: | 24020.1090905775@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
>> Attached is the savepoints syntax patch, hopefully last try.
>> - Tab completion patch from Gaetano is included.
Reviewed and committed.
I did not apply your changes to spi.c, instead choosing to revert it to
the former coding that disallowed any TransactionStmts. I don't think
it will possibly work for SPI to execute such commands: if it did,
control would return to the caller with a different active transaction,
different active memory context, etc.
Oracle's PL/SQL behavior seems to posit that the PL/SQL function
executes "outside the database" and can have local state that is not
affected by SAVEPOINT, ROLLBACK, et al. I'm not sure if we really
want to support that, but in any case there's no chance of doing it
for 7.5. Our functions very definitely execute inside transactions.
What we could do at the SPI level is to provide functions that
encapsulate start-subxact/execute-command/commit-or-abort-subxact
so that control returns in the same subxact you started in, and you
can get control back if the executed command fails.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2004-07-27 06:16:47 | casting strings to multidimensional arrays yields strange results |
Previous Message | Claudio Natoli | 2004-07-27 04:42:03 | Re: win32 version info |