Thread: Windows build missing tcl "UNKNOWN" support

Windows build missing tcl "UNKNOWN" support

From
"Carlo Stonebanks"
Date:
The Windows builds (in our case, 8.3) still seem to be missing

magic tables: pltcl_modules and pltcl_modfuncs.
scripts: pltcl_loadmod, pltcl_listmod and pltcl_delmod

In 2006 I reported this problem (see below) with the PG 8.1 Windows build.
This issue came up, and I when I looked to see if it was fixed, (my client
has updated his install to 8.3) I see that these scripts are still missing.
Another concern is "PL/Tcl call handler must be compiled
with -DPLTCL_UNKNOWN_SUPPORT set." to use the features I want.

(None of the Windows packages are compiled from source, they are the
one-click installs from the PostgreSQL site.)

Any suggestions on how to resolve this would be much appreciated!

Carlo

Original Aug 2006 post on this subject:



From the plTcl docs it appears the way for me to create function/procedure
libraries for plTcl is by implementing the "unknown" command. However, my
8.1.4 Windows-based installation doesn't seem to jibe with what the docs say
I should expect::

<<

PL/Tcl has a special support for things often used. It recognizes two magic
tables, pltcl_modules and pltcl_modfuncs.

>>



The docs don't mention where these should be, or how to create them. Other
docs refer to scripts called: pltcl_loadmod, pltcl_listmod and pltcl_delmod
but they are nowhere to be found. Can anyone enlighten me?



<<

To enable this behavior, the PL/Tcl call handler must be compiled
with -DPLTCL_UNKNOWN_SUPPORT set.

>>



I have a Windows-based server, and I am assuming the pre-compiled library
file pltcl.dll is supporting it - no compiling option there. How do I find
out if it was compiled with DPLTCL_UNKNOWN_SUPPORT set?



Re: Windows build missing tcl "UNKNOWN" support

From
Tom Lane
Date:
"Carlo Stonebanks" <stonec.register@sympatico.ca> writes:
> The Windows builds (in our case, 8.3) still seem to be missing
> magic tables: pltcl_modules and pltcl_modfuncs.
> scripts: pltcl_loadmod, pltcl_listmod and pltcl_delmod

It does appear that no one's gotten around to making the MSVC build
scripts install those tcl scripts.  But you could take them from any
other installation, or the CVS sources.  All that's needed is to fix
the tclsh path at the start of each one.

The "magic tables" are to be created by hand, there is no automatic
installation of them.

> Another concern is "PL/Tcl call handler must be compiled
> with -DPLTCL_UNKNOWN_SUPPORT set." to use the features I want.

Dunno where you got that idea from, but it's not so.

            regards, tom lane

Re: Windows build missing tcl "UNKNOWN" support

From
"Carlo Stonebanks"
Date:
>> Another concern is "PL/Tcl call handler must be compiled
>> with -DPLTCL_UNKNOWN_SUPPORT set." to use the features I want.
>
> Dunno where you got that idea from, but it's not so.
>
> The "magic tables" are to be created by hand, there is no automatic
> installation of them.
>

Hmm - seems that this was a version 7 issue:
http://www.postgresql.org/docs/7/static/c43624375.htm

More recent documentation has taken out any mention of the compiler switch.
or the tables being "magic" (I am having trouble underestanding why these
tables would have been considered "magic" since the only context I have used
this term has been with the virtual tables used within triggers.)

I am looking at the CVS now. Because there is no documentation on this, I'd
just like to run through the procedures to be sure (and help out anyone else
who finds this):
I see the make file, but I assume this is for a 'NIX sh (apolgies, not a
'NIX guy). I do not know how to make this work on Windows, so I will guess
(using default folder names):

From command line:
copy pltcl_loadmod.tcl /pgsql/bin
copy pltcl_delmod.tcl  /pgsql/bin
copy pltcl_listmod.tcl /pgsql/bin
copy unknown.pltcl /pgsql/data

Then:

- Modify scripts to suit my TCL environment
- Execute the pltcl_loadmod with host, db and TCL source as parameters, TCL
file contains lib functions that would get called when pgTcl executes
"unknown"
- Execute pltcl_listmod to see if this is all working correctly
- Execute pltcl_delmod to remove modules when I need to

Will that work?

Carlo


"Tom Lane" <tgl@sss.pgh.pa.us> wrote in message
news:28281.1270071172@sss.pgh.pa.us...
> "Carlo Stonebanks" <stonec.register@sympatico.ca> writes:
>> The Windows builds (in our case, 8.3) still seem to be missing
>> magic tables: pltcl_modules and pltcl_modfuncs.
>> scripts: pltcl_loadmod, pltcl_listmod and pltcl_delmod
>
> It does appear that no one's gotten around to making the MSVC build
> scripts install those tcl scripts.  But you could take them from any
> other installation, or the CVS sources.  All that's needed is to fix
> the tclsh path at the start of each one.
>
> The "magic tables" are to be created by hand, there is no automatic
> installation of them.
>
>
> regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>