From: | craig perras <craigp98072(at)yahoo(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | transaction aborts in SPI |
Date: | 2004-06-09 17:36:07 |
Message-ID: | 20040609173607.7125.qmail@web21201.mail.yahoo.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I've appended a quote from Ch 41 on the SPI; I'd like
to make sure I understand the implications of this. If
I've allocated resources inside my procedure (file
handles or what-not), how would I clean those up in
the case of a transaction abort? Could I Notify my
application that the transaction aborted (IIUC they
aren't sent in the case of a transaction abort)?
thanks!
--craig
Note that if during the execution of a procedure the
transaction is aborted because of an error in a
command, then control will not be returned to your
procedure. Rather, all work will be rolled back and
the server will wait for the next command from the
client. A related restriction is the inability to
execute BEGIN, COMMIT, and ROLLBACK (transaction
control statements) inside a procedure. Both of these
restrictions will probably be changed in the future.
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2004-06-09 17:41:15 | Re: thread safety tests |
Previous Message | Alvaro Herrera | 2004-06-09 17:05:43 | Re: Frequently updated tables |