transaction aborts in SPI - Mailing list pgsql-hackers

From craig perras
Subject transaction aborts in SPI
Date
Msg-id 20040609173607.7125.qmail@web21201.mail.yahoo.com
Whole thread Raw
List 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/ 


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Nested xacts: looking for testers and review
Next
From: Christopher Browne
Date:
Subject: Re: sequences and "addval('myseq', value)"