PLR does not install language templates

Started by Josh Berkusover 12 years ago4 messages
#1Josh Berkus
josh@agliodbs.com

Joe, all:

Ok, this is wierd. This is PostgreSQL 9.2.4, on Centos 6, installed
using the packages at yum.postgresql.org. Is the below an issue with
PL/R, the packages, or PostgreSQL?

Seems like if a language is actually *installed*, it needs to have
templates ...

analytics=# \dL
List of languages
Name | Owner | Trusted | Description
-----------+----------+---------+------------------------------------------
plpgsql | postgres | t | PL/pgSQL procedural language
plpythonu | postgres | f | PL/PythonU untrusted procedural language
plr | postgres | f |

analytics=# select * from pg_pltemplate ;
tmplname | tmpltrusted | tmpldbacreate | tmplhandler |
tmplinline | tmplvalidator | tmpllibrary | tmp
lacl
------------+-------------+---------------+------------------------+--------------------------+---------------------+-------------------+----
-----
plpgsql | t | t | plpgsql_call_handler |
plpgsql_inline_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_inline_handler | plperl_validator | $libdir/plperl |
plperlu | f | f | plperlu_call_handler |
plperlu_inline_handler | plperlu_validator | $libdir/plperl |
plpythonu | f | f | plpython_call_handler |
plpython_inline_handler | plpython_validator | $libdir/plpython2 |
plpython2u | f | f | plpython2_call_handler |
plpython2_inline_handler | plpython2_validator | $libdir/plpython2 |
plpython3u | f | f | plpython3_call_handler |
plpython3_inline_handler | plpython3_validator | $libdir/plpython3 |
(8 rows)

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Andres Freund
andres@2ndquadrant.com
In reply to: Josh Berkus (#1)
Re: PLR does not install language templates

On 2013-06-24 12:24:29 -0700, Josh Berkus wrote:

Joe, all:

Ok, this is wierd. This is PostgreSQL 9.2.4, on Centos 6, installed
using the packages at yum.postgresql.org. Is the below an issue with
PL/R, the packages, or PostgreSQL?

Seems like if a language is actually *installed*, it needs to have
templates ...

No. Why? We don't really need templates at all anymore since the advent
of extensions.

The original reason for pltemplates was that the user shouldn't have to
manually know the handler names you need to pass to CREATE LANGUAGE. Now
we have CREATE EXTENSION making that unneccessary. So it's only backward
compat with older dumps that contain CREATE LANGUAGE verbatim instead of
CREATE EXTENSION.

How should pl/r automagically be installed into pl_template anyway? The
initdb may very well have been executed before installing pl/r.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Josh Berkus (#1)
Re: PLR does not install language templates

Josh Berkus <josh@agliodbs.com> writes:

Ok, this is wierd. This is PostgreSQL 9.2.4, on Centos 6, installed
using the packages at yum.postgresql.org. Is the below an issue with
PL/R, the packages, or PostgreSQL?

Seems like if a language is actually *installed*, it needs to have
templates ...

Not necessarily --- that's an optional feature. In fact, I am not eager
to encourage third-party PLs to start installing pg_pltemplate entries
anymore, because that's mostly vestigial in the extensions universe.
We should be encouraging use of CREATE EXTENSION not CREATE LANGUAGE to
install PLs, and for that you don't need a pltemplate entry. It's
likely that pg_pltemplate will disappear entirely before long.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Josh Berkus
josh@agliodbs.com
In reply to: Josh Berkus (#1)
Re: PLR does not install language templates

Not necessarily --- that's an optional feature. In fact, I am not eager
to encourage third-party PLs to start installing pg_pltemplate entries
anymore, because that's mostly vestigial in the extensions universe.
We should be encouraging use of CREATE EXTENSION not CREATE LANGUAGE to
install PLs, and for that you don't need a pltemplate entry. It's
likely that pg_pltemplate will disappear entirely before long.

Ah, ok. Thanks!

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers