Thread: Pltcl error - could not create "normal" interpreter
Greetings, Could somebody shed any light on the error message below that came from trying to call a simple pltcl test function? I am running Postgres 8.1 on WinXP and just recently added the pltcl language by copying Tcl84.dll into my system directory (C:/Windows/System32) and successfully issuing the command: > createlang pltcl -U db_admin postgres What else do I need to do or configure to enable this full functionality? postgres=# create or replace function test_fxn() returns void as $$ postgres$# spi_exec "SELECT * FROM test" postgres$# $$ language pltcl; CREATE FUNCTION postgres=# select test_fxn(); ERROR: could not create "normal" interpreter postgres=# Any help is greatly appreciated and the little that's in the archives/www is fairly abstruse. Thanks, JL
"Lenorovitz, Joel" <Joel.Lenorovitz@usap.gov> writes: > Could somebody shed any light on the error message below that came from > trying to call a simple pltcl test function? I am running Postgres 8.1 > on WinXP and just recently added the pltcl language by copying Tcl84.dll > into my system directory (C:/Windows/System32) and successfully issuing > the command: >> createlang pltcl -U db_admin postgres Hm, surely that .dll is not the only component of a standard Tcl installation? The error message is pretty unhelpful I agree, but I suspect it may mean that Tcl's attempt to execute some kind of init file failed. regards, tom lane
"Lenorovitz, Joel" <Joel.Lenorovitz@usap.gov> writes: > Could somebody shed any light on the error message below that came from > trying to call a simple pltcl test function? I am running Postgres 8.1 > on WinXP and just recently added the pltcl language by copying Tcl84.dll > into my system directory (C:/Windows/System32) and successfully issuing > the command: >> createlang pltcl -U db_admin postgres I was able to reproduce the "could not create "normal" interpreter" behavior after removing "init.tcl" from the Tcl library directory. Unfortunately, it seems that this breaks Tcl badly enough that it's not capable of returning a useful error message :-( --- the fact that our code doesn't make any attempt to print the interpreter result is probably Not Good, but when I changed it to do so, I still didn't get anything but an empty string ... So the short answer is "install Tcl per its directions". regards, tom lane