Re: pltcl problem

From: Ian Harding <iharding(at)tpchd(dot)org>
To: Russ Brown <postgres(at)dot4dot(dot)plus(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pltcl problem
Date: 2003-09-24 08:31:20
Message-ID: 3F715658.60401@tpchd.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

That line, in a context where it will get evaluated by the tcl
interpreter, should work.

Do you have a tcl variable called vchtablename available at that point
in your script? If it is a tcl array, to get its contents, you need
[array get vchtablename] instead of the $ dereference. However, that
seems not to be your problem.

Can you send the tcl trigger function code, and the create trigger
statement?

Russ Brown wrote:

> Hi,
>
> I'm trying to debug a pltcl procedure (being used as a trigger), and
> I'm having trouble generating useful debug output.
>
> I'm using elog, and I want the output to contain the value of an
> array. So, I'm using a command like this:
>
> elog DEBUG "Trigger Call $vchtablename"
>
> Trouble is, it's appearing in the error log exactly like that
> (including the 'elog DEBUG' part.
>
> If I indent the line, the spaces at the start appear in the error log
> also.
>
> I've tried removing the quotes and I get the same output (minus the
> quotes)
>
> I'm probably doing something wrong that pretty obvious (been staring
> at the code for too long, plus this is the first time I've ever used
> TCL, so it could be a very obvious mistake!). If anyone can give me a
> hint as to what my error might be, that would be great.
>
> Thanks,
>
>------------------------------------------------------------------------
>
>SPAM: TO_ADDRESS_EQ_REAL (0.4 points) To: repeats address as real name
>SPAM: X_MAILING_LIST (-0.0 points) Has a X-Mailing-List header
>SPAM: BAYES_00 (-5.2 points) Bayesian classifier says spam probability is 0 to 1%
>Score Total: -4.8
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arjen van der Meijden 2003-09-24 09:52:36 Re: [GENERAL] Fatal error: Allowed memory size of 8388608
Previous Message Marek Lewczuk 2003-09-24 08:04:49 Re: GET LAST ID INSERT