pltcl: missing close-brace
От | Jonathan Ellis |
---|---|
Тема | pltcl: missing close-brace |
Дата | |
Msg-id | 005301c05b30$be4318c0$0d00a8c0@dsl.inconnect.com обсуждение исходный текст |
Ответ на | Re: Can PostGreSQL handle 100 user database? ("Brian C. Doyle" <bcdoyle@mindspring.com>) |
Ответы |
Re: pltcl: missing close-brace
|
Список | pgsql-general |
I have a pl/tcl function that doesn't work, but the same function in a plain-vanilla tcl script does. (The function emulates Oracle's "replace" function.) The PL/TCL results: bf2=# create function replace2 (varchar, varchar, varchar) returns varchar as ' regsub -all {&} "$3" {\\\&} 3 regsub -all {\\[0-9]} "$3" {\\\0} 3 eval "regsub -all \{$2\} \{$1\} \{$3\} rval" return $rval ' language 'pltcl'; bf2'# bf2'# bf2'# bf2'# bf2'# CREATE bf2=# select replace2('a b', ' ', 'c'); ERROR: pltcl: missing close-brace The plain tcl results: #!/usr/bin/tcl proc replace { 1 2 3 } { regsub -all {&} "$3" {\\\&} 3 regsub -all {\\[0-9]} "$3" {\\\0} 3 eval "regsub -all \{$2\} \{$1\} \{$3\} rval" return $rval } puts [replace "a b" " " "c"] $ ./test.tcl acb Any idea what this error message means? -Jonathan
В списке pgsql-general по дате отправления: