1

I tried to create a language pltcl in postgresql. But, I got this error.

postgres=# CREATE LANGUAGE 'pltcl';
ERROR:  could not access file "$libdir/pltcl": No such file or directory


postgres=# select * from pg_pltemplate;
 tmplname  | tmpltrusted | tmpldbacreate |      tmplhandler      |   tmplvalidator   |   tmpllibrary    | tmplacl 
-----------+-------------+---------------+-----------------------+-------------------+------------------+---------
 plpgsql   | t           | t             | plpgsql_call_handler  | plpgsql_validator | $libdir/plpgsql  | 
 pltcl     | t           | t             | pltcl_call_handler    |                   | $libdir/pltcl    | 
 pltclu    | f           | f             | pltclu_call_handler   |                   | $libdir/pltcl    | 
 plperl    | t           | t             | plperl_call_handler   | plperl_validator  | $libdir/plperl   | 
 plperlu   | f           | f             | plperl_call_handler   | plperl_validator  | $libdir/plperl   | 
 plpythonu | f           | f             | plpython_call_handler |                   | $libdir/plpython | 

After referred the internet, I got the answer. That is,

In order to get pltcl.so you will need to compile the postgres code using --with-tcl configure switch. pltcl does not compile by default with postgres.

How to fix this problem?

1
  • How did you install postgresql? From source? Commented Oct 27, 2012 at 12:40

2 Answers 2

3

You need to install the postgresql-pltcl-9.1 package, replacing the 9.1 with the postgres version you're using if it's different.

Sign up to request clarification or add additional context in comments.

1 Comment

Here you can find all PostgreSQL packages provided by Debian.
2
sudo apt-get install postgresql-pltcl-9.6 postgresql-plperl-9.6

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.