Re: [HACKERS] pltcl and LDAP

Jan Wieck <wieck@debis.com>

From: wieck@debis.com (Jan Wieck)
To: Joe Conway <jconway2@home.com>
Cc: pgsql-hackers@postgreSQL.org
Date: 2000-02-23T10:22:52Z
Lists: pgsql-hackers
Joe Conway wrote:

> Hi,
>
> I posted this a few days ago on the pgsql-sql list, but got no response. Is
> there any way to enable loading tclLDAP from within a pltcl function? I
> would like to maintain an openldap directory using an update/insert trigger.
>
> I modified pltcl.c to load a non-safe interpreter and recompiled. This
> allowed me to use the "load" command, but the tclLDAP library still would
> not load. The error message is:
>
> ERROR: pltcl: couldn't load file "/usr/lib/tclLDAP/Ldap.so":
> /usr/lib/tclLDAP/Ldap.so: undefined symbol: Tcl_PkgProvide (#1)

    Um - and that's the only unresolved one?

    Which  version  of Tcl is used from PL/Tcl, and which version
    is the Ldap.so linked against?

> I am not even close to being fluent in c. I would greatly appreciate any
> suggestions.
>
> BTW, perhaps in some future release you might consider allowing a non-safe
> tcl interpreter (or at least some kind of controlled external library
> support) as an option.

    Kinda that is on my personal TODO/wishlist. Splitting  PL/Tcl
    into  two  separate  interpreters  internally,  identified by
    different language names.  The  unsafe  language,  with  full
    access to OS under the postgres userID, would be an untrusted
    language, so  creation  of  functions  is  restricted  to  DB
    superusers.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #