*** pltcl.sgml 2007-10-01 08:29:06.667578247 -0400
--- pltcl.sgml.new 2007-10-01 08:24:41.736708719 -0400
***************
*** 70,75 ****
--- 70,87 ----
createlang pltcl dbname> or
createlang pltclu dbname>.
+
+ Care should be taken when linking the pltcl shared object code against
+ TCL libraries earlier than the TCL 8.4 release. The pre-8.4 versions of TCL must
+ be built without multithreading support, i.e. with TCL_THREADS
+ undefined. Otherwise, the first use of PL/TCL functions will cause the postgres
+ backend to become multithreaded, resulting in subsequent "unexpected state" errors.
+ PL/TCL can be safely linked against multithreaded versions of the
+ TCL library for TCL versions 8.4 and later. In these cases, the pltcl source code uses
+ capabilities introduced in TCL 8.4 to override and disable the multithreading behavior.
+ Note that pre-8.4 versions of TCL were rarely built with multithreading support in
+ pre-compiled distributions, so this problem is rather rare.
+