[SQL] Error handling in pltcl

2005-04-17 Thread Dinesh Pandey
Hi,   Can any one tell me how to handle error in PL/TCL language.   On Error/Exception, In the exception block I want to call a FUNCTION (written in PL/pgSQL).   ThanksDinesh Pandey  

Re: [SQL] Error handling in pltcl

2005-04-17 Thread Michael Fuhr
On Mon, Apr 18, 2005 at 09:20:37AM +0530, Dinesh Pandey wrote: > > Can any one tell me how to handle error in PL/TCL language. What kind of error? Have you tried using catch? > On Error/Exception, > In the exception block I want to call a FUNCTION (written in PL/pgSQL). You could use spi_exe

Re: [SQL] Error handling in pltcl

2005-04-17 Thread Dinesh Pandey
I have attached below an e-mail program. I want to log messages into a table from a function written in 'plpgsql' whenever any exception occurs (like unable to connect/invalid email etc..) Pls update the code attached below Thanks Dinesh Pandey CREATE OR REPLACE FUNCTIO

[SQL] "pltcl" function.

2005-04-17 Thread Dinesh Pandey
What is error in this statement of “pltcl” function.   set var   'SENDING EMAIL TO: '||$mailto||' from: '||$mailfrom||' with: '||$emailserver   I am getting this error: ERROR:  wrong # args: should be "set varName ?newValue?" Regards Dinesh Pandey