What's wrong in this pltcl function ?

Поиск
Список
Период
Сортировка
От Constantin Teodorescu
Тема What's wrong in this pltcl function ?
Дата
Msg-id 3DAA8ADB.6060208@flex.ro
обсуждение исходный текст
Ответы Re: What's wrong in this pltcl function ?  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Re: What's wrong in this pltcl function ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-interfaces
create function ruldeb(bpchar) returns bpchar as '   set cont $1   set rulaj 0.0   spi_exec -array rec "select valoare
fromvalori where debitor LIKE 
 
\'$cont%\'" {       set rulaj [expr {$rulaj + $rec(valoare)}]   }   if {![info exists GD(conturi_lookup)]} {       set
GD(conturi_lookup)[spi_prepare "select cheie,denumire from 
 
conturi where id=\'\\$1\'" [list bpchar]]   }   spi_execp -count 1 $GD(conturi_lookup) [list $cont]   return "{$cheie}
{$denumire}$rulaj"
 
' LANGUAGE 'pltcl';


is giving the following error:

ERROR:  pltcl: can't read "cheie": no such variable
can't read "cheie": no such variable   while executing
"return "{$cheie} {$denumire} $rulaj""   (procedure "__PLTcl_proc_1759991" line 12)   invoked from within
"__PLTcl_proc_1759991 4:0:1:1:2:"


------------------
Please, could someone give me a clue?

thanks in advance,
Constantin Teodorescu
Braila, ROMANIA




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

Предыдущее
От: John Joseph Bachir
Дата:
Сообщение: what versino of perl
Следующее
От: "Nigel J. Andrews"
Дата:
Сообщение: Re: What's wrong in this pltcl function ?