Re: PL/TCL Unkown module - Mailing list pgsql-general

From Carlo Stonebanks
Subject Re: PL/TCL Unkown module
Date
Msg-id i8eakr$62d$1@news.hub.org
Whole thread Raw
In response to Re: PL/TCL Unkown module  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
>> if you want this to be for pltcl not pltclu...  You're not going to be
>> able
>> to source random files from the filesystem.

Thanks - we're doing this using pltclu and have been using "source..." for 4
years with no trouble.

> Well, you can use whatever "unknown" function you want, but it has to be
> loaded from that table;

Then I have to figure out what to do next - so here's my checklist:

1) Since PL/TCL always looks for pltcl_modules automatically all
interpreters that hit an unknown command will find the entry for "unkown"
which I can rewrite to load my libs keeping in mind the limitations of the
type of interpreter pltcl or pltclu.
2) For our LINUX people, I would guess that they need to run from a shell:
   pltcl_loadmod.in myDb unknown.pltcl -host myHost
3) For Windows, I guess I would have to comment out: exec @TCLSH@ "$0" "$@"
then run from the command window:
   tclsh pltcl_loadmod.in myDb unknown.pltcl -host myHost

Is this right?

Is there any way for a sub prc to know whether it is running within a pltclu
or pltcl interpreter? I wrote a test proc showing the globals within a
pltclu proc and I don't see anything obvious.



pgsql-general by date:

Previous
From: Konstantin Izmailov
Date:
Subject: Is there a logical reason for 25P02?
Next
From: "Lumber Cartel, local 42"
Date:
Subject: Re: How to data dump a table content to a CSV or XML format?