LKBEN11153: Howto list all the PL Languages for a postgres database


You would like to use a certain language for using postgresql e.g. plpgsql




You can create the language with the command:


You can opt for creating this language in your template database which is used to create new databases. In this case you will always have the language available in new databases.
Createlang is a command line program that is located in the bin folder of your PostgreSQL installation directory.

I you would like to see a list of procedural languages that you already have in PostgreSQL you can use the following select statement:

SELECT * FROM pg_catalog.pg_pltemplate

The output might look like this:

postgres=# SELECT * FROM pg_catalog.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 |
(6 Zeilen)

and can, probably will, be different on your system.


The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!

About the Author

Author: Wim Peeters - Keskon GmbH & Co. KG

Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.