Re: "pltcl" function.

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: "pltcl" function.
Date: 2005-04-19 04:50:17
Message-ID: 20050419045017.GB76187@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lorenzo Thurman 2005-04-19 04:52:37 Re: pg_dump fails
Previous Message Michael Fuhr 2005-04-19 04:44:02 Re: How to include "EXCEPTION" handling block in PL/TCL function.

Browse pgsql-sql by date

  From Date Subject
Next Message Ramakrishnan Muralidharan 2005-04-19 05:03:17 Re: SQL group select question
Previous Message Bill Lawrence 2005-04-19 04:08:22 Re: Getting the output of a function used in a where clause