From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Dinesh Pandey <dpandey(at)secf(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to include "EXCEPTION" handling block in PL/TCL function. |
Date: | 2005-04-19 04:44:02 |
Message-ID: | 20050419044402.GA76187@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-patches |
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/
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-04-19 04:50:17 | Re: "pltcl" function. |
Previous Message | Dinesh Pandey | 2005-04-19 03:59:41 | Re: Urgent |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-04-19 04:46:06 | Re: [HACKERS] Implementation of SQLCODE and SQLERRM variables for |
Previous Message | Dinesh Pandey | 2005-04-19 04:04:41 | Re: [HACKERS] Implementation of SQLCODE and SQLERRM variables |