Re: "pltcl" function. - Mailing list pgsql-general

From Michael Fuhr
Subject Re: "pltcl" function.
Date
Msg-id 20050419045017.GB76187@winnie.fuhr.org
Whole thread Raw
In response to "pltcl" function.  ("Dinesh Pandey" <dpandey@secf.com>)
List pgsql-general
On Mon, Apr 18, 2005 at 12:01:58PM +0530, Dinesh Pandey wrote:
>
> 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?"

You're mixing languages: you're using the SQL concatenation operator
(||) in a Tcl function.  See a Tcl reference for the details of Tcl
syntax.  The following should work:

set var "SENDING EMAIL TO: $mailto from: $mailfrom with: $emailserver"

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: How to include "EXCEPTION" handling block in PL/TCL function.
Next
From: Lorenzo Thurman
Date:
Subject: Re: pg_dump fails