Re: [PATCHES] [subxacts] Savepoint syntax
On Sun, Jul 25, 2004 at 04:58:01PM -0400, Alvaro Herrera wrote: Attached is the savepoints syntax patch, hopefully last try. Essentially the same as the last patch, with the following differences: Brown paper bag patch. Please disregard. I'll post a good patch tomorrow morning. Sorry for the noise, -- Alvaro Herrera (alvherre[a]dcc.uchile.cl) Having your biases confirmed independently is how scientific progress is made, and hence made our great society what it is today (Mary Gardiner) ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [PATCHES] [subxacts] Savepoint syntax
Alvaro Herrera [EMAIL PROTECTED] 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 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] [subxacts] Savepoint syntax
On Wed, Jul 14, 2004 at 03:03:02PM -0400, Alvaro Herrera wrote: Please test, review and apply. If anyone is able to crash the server using this I'll be most interested. I just noticed that the misc regression test is generated, and so it needs to be patched ... interdiff output attached. -- Alvaro Herrera (alvherre[a]dcc.uchile.cl) Entristecido, Wutra (canciĆ³n de Las Barreras) echa a Freyr a rodar y a nosotros al mar only in patch2: unchanged: --- src/test/regress/output/misc.source 10 May 2004 22:44:49 - 1.42 +++ src/test/regress/output/misc.source 16 Jul 2004 05:08:18 - @@ -644,6 +644,7 @@ real_city reltime_tbl road + savepoints shighway slow_emp4000 street @@ -661,7 +662,7 @@ toyemp varchar_tbl xacttest -(97 rows) +(98 rows) SELECT name(equipment(hobby_construct(text 'skywalking', text 'mer'))); name ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [PATCHES] [subxacts] Savepoint syntax
On Wed, 2004-07-14 at 20:03, Alvaro Herrera wrote: So I have dropped the idea of the propietary syntax. This patch implements proper savepoint syntax. Includes regression tests but no documentation is provided yet. Excellent. Thank you very much for your efforts. Many thanks, Simon Riggs ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster