pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: craig perras <craigp98072@yahoo.com>
To: pgsql-interfaces@postgresql.org
Subject: cleaning up in UDF's (user-defined functions)
Date: Tue, 8 Jun 2004 19:29:08 -0700 (PDT)
Message-ID: <20040609022908.43286.qmail@web21208.mail.yahoo.com> (raw)

I appended an excerpt from the docs... IIUC, if I make
a DSQL call from a UDF (written in C), and there's a
transaction abort caused by that command, then my
function is never called back. How do I cleanup any
resources the function allocated if this is the case?

I'm not even sure how I could NOTIFY clients, since
the transaction aborted.

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/ 



view thread (2+ messages)  latest in thread

Message-ID: <20040609022908.43286.qmail@web21208.mail.yahoo.com>
Permalink:  ../20040609022908.43286.qmail@web21208.mail.yahoo.com/
Also on:    postgresql.org/message-id/20040609022908.43286.qmail@web21208.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: craigp98072@yahoo.com
  Subject: Re: cleaning up in UDF's (user-defined functions)
  In-Reply-To: <20040609022908.43286.qmail@web21208.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox