Re: pltcl problem

Поиск
Список
Период
Сортировка
От Ian Harding
Тема Re: pltcl problem
Дата
Msg-id 3F715658.60401@tpchd.org
обсуждение исходный текст
Ответ на pltcl problem  (Russ Brown <postgres@dot4dot.plus.com>)
Список 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
>



В списке pgsql-general по дате отправления:

Предыдущее
От: Jonathan Bartlett
Дата:
Сообщение: Re: career in SQL/Database administration
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: An idea for IPU ( We need another acronymn! )