I have configured, built, and installed ProsgreSQL 6.5.1 using:

    --with-tcl and --with-tkconfig=<dir>

As far as I have looked, everything was built and installed without a
hitch. The pltcl library is in the right location, and /etc/ld.so.conf
lists that directory.

When I define a function using pltcl I get the following:

    ERROR: Unrecognized language specified in a CREATE FUNCTION:
    'pltcl'.  Recognized languages are sql, C, internal and the
    created procedural languages.

The docs say that pltcl is enabled if it is built with the TCL
option. What am I missing?

Thanks
-- 
Patrick Logan    patrickdlogan@home.com

Wed, 08 Sep 1999 16:49:09 GMT
Patrick Logan <patrick@c837917-a.potlnd1.or.home.com>
Problem enabling pltcl
Patrick Logan wrote:
>     ERROR: Unrecognized language specified in a CREATE FUNCTION:
>     'pltcl'.  Recognized languages are sql, C, internal and the
>     created procedural languages.
> 
> The docs say that pltcl is enabled if it is built with the TCL
> option. What am I missing?

CREATE LANGUAGE (command line utility 'createlang').  See the regression
test shell script (src/test/regress/regress.sh) for an example using
plpgsql.  The PL's are not created and installed by default, apparently.

Lamar Owen
WGCR Internet Radio

Wed, 08 Sep 1999 13:30:10 -0400
Lamar Owen <lamar.owen@wgcr.org>
Re: [HACKERS] Problem enabling pltcl
Lamar Owen <lamar.owen@wgcr.org> wrote:
: Patrick Logan wrote:
:>     ERROR: Unrecognized language specified in a CREATE FUNCTION:
:>     'pltcl'.  Recognized languages are sql, C, internal and the
:>     created procedural languages.
:> 
:> The docs say that pltcl is enabled if it is built with the TCL
:> option. What am I missing?

: CREATE LANGUAGE (command line utility 'createlang').  See the regression
: test shell script (src/test/regress/regress.sh) for an example using
: plpgsql.  The PL's are not created and installed by default, apparently.

Thanks. I also had to create the handler function as per the
documentation for creating new procedural language interfaces.

Boy, the documentation sure read to me like all that was supposed to
be done automatically by the Makefile when configured for pltcl.

Not a big deal, but it wasn't clear to me this had to be done for each
database created. Is this a bug in the documentation?

-- 
Patrick Logan    patrickdlogan@home.com

Wed, 08 Sep 1999 20:32:09 GMT
Patrick Logan <patrick@c837917-a.potlnd1.or.home.com>
Re: Problem enabling pltcl
Patrick Logan <patrick@c837917-a.potlnd1.or.home.com> writes:
> : CREATE LANGUAGE (command line utility 'createlang').  See the regression
> : test shell script (src/test/regress/regress.sh) for an example using
> : plpgsql.  The PL's are not created and installed by default, apparently.

> Boy, the documentation sure read to me like all that was supposed to
> be done automatically by the Makefile when configured for pltcl.
> Not a big deal, but it wasn't clear to me this had to be done for each
> database created. Is this a bug in the documentation?

Probably.  You should be able to just use the createlang utility without
worrying about the details, but I don't think that the install process
ought to do it for you.  The procedural languages are supposed to be
installable on a per-database basis, in case you want them in some
databases and not others.

You *can* do a one-time install of a language for a whole installation,
by installing the language into template1 before you create any working
databases --- this works because "create database" clones whatever is in
template1.  (I believe that holds for anything you stick in template1,
BTW, not just languages.)

But if the install process were to install pltcl into template1 just
because you had chosen to build pltcl, then you'd lose the option of
only having it in some of your databases.

Bottom line: I think the install process is correct as is, but the docs
need to be updated to mention these considerations.

			regards, tom lane

Wed, 08 Sep 1999 17:42:45 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Re: Problem enabling pltcl 
>
> Patrick Logan wrote:
> >     ERROR: Unrecognized language specified in a CREATE FUNCTION:
> >     'pltcl'.  Recognized languages are sql, C, internal and the
> >     created procedural languages.
> >
> > The docs say that pltcl is enabled if it is built with the TCL
> > option. What am I missing?
>
> CREATE LANGUAGE (command line utility 'createlang').  See the regression
> test shell script (src/test/regress/regress.sh) for an example using
> plpgsql.  The PL's are not created and installed by default, apparently.

    Yepp  -  it's  a doc mistake because first I made it that way
    and we decided later not to install by default into template1
    and provide createlang instead.


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) #



Thu, 9 Sep 1999 12:53:10 +0200 (MET DST)
wieck@debis.com (Jan Wieck)
Re: [HACKERS] Problem enabling pltcl
Tom Lane wrote:

> But if the install process were to install pltcl into template1 just
> because you had chosen to build pltcl, then you'd lose the option of
> only having it in some of your databases.

    You  still  have  that  option  even  if  it  is installed in
    template1. But you must do it the other  way  round  and  use
    destroydb on the databases where you don't want it :-)

> Bottom line: I think the install process is correct as is, but the docs
> need to be updated to mention these considerations.

    The   docs   where   right  for  a  short  time  during  v6.5
    development.


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) #



Thu, 9 Sep 1999 12:58:56 +0200 (MET DST)
wieck@debis.com (Jan Wieck)
Re: [HACKERS] Re: Problem enabling pltcl
> Bottom line: I think the install process is correct as is, but the docs
> need to be updated to mention these considerations.

Any takers? Look in doc/src/sgml/*.sgml for the doc sources; usually
grepping for a phrase is enough to figure out which source file you
need to change.

                   - Thomas

-- 
Thomas Lockhart				lockhart@alumni.caltech.edu
South Pasadena, California

Thu, 09 Sep 1999 12:33:14 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: [HACKERS] Re: Problem enabling pltcl