Re: How to include "EXCEPTION" handling block in PL/TCL function.

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: How to include "EXCEPTION" handling block in PL/TCL function.
Дата
Msg-id 20050419044402.GA76187@winnie.fuhr.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Dinesh Pandey"
Дата:
Сообщение: Re: Urgent
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: "pltcl" function.