On Mon, Apr 18, 2005 at 10:36:27AM +0530, Dinesh Pandey wrote: > > How to include "EXCEPTION" handling block in PL/TCL function. As I mentioned in a previous message, "catch" is the Tcl mechanism for trapping runtime errors (e.g., a failed socket connection). See a Tcl reference for details. http://www.tcl.tk/man/tcl8.4/TclCmd/catch.htm "catch" appears to work in PL/Tcl functions, at least in PostgreSQL 8.0.2. Since your function speaks SMTP, you should be familiar with that protocol so you can check the server's responses. See RFC 2821 for details, especially section 4.2 SMTP Replies and section 4.3 Sequencing of Commands and Replies: ftp://ftp.rfc-editor.org/in-notes/rfc2821.txt -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org