Re: How to include "EXCEPTION" handling block in PL/TCL function. - Mailing list pgsql-general

From Michael Fuhr
Subject Re: How to include "EXCEPTION" handling block in PL/TCL function.
Date
Msg-id 20050419044402.GA76187@winnie.fuhr.org
Whole thread Raw
List pgsql-general
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/

pgsql-general by date:

Previous
From: "Dinesh Pandey"
Date:
Subject: Re: Urgent
Next
From: Michael Fuhr
Date:
Subject: Re: "pltcl" function.