From: Richard Bayet <bayet@enseirb.fr>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: How to made available for a database an already installed language on another database ?
Date: Wed, 17 Jan 2001 12:49:01 +0100
Message-ID: <3A6586AD.4BEA606@enseirb.fr> (raw)
References: <3A65150E.5AFF75CC@enseirb.fr>
<15810.979706083@sss.pgh.pa.us>
Tom Lane a écrit :
> Richard Bayet <bayet@enseirb.fr> writes:
> > And the problem is that they can't add any language support with
> > createlang.
> > Anytime they tried (for example '$>createlang plpgsql theirdb'), the
> > program seemed to "freeze" on authentification ...
> > They got a :
> > "$> createlang plpgsql theirdb
> > Password: THEIRPASS Password: THEIRPASS Password: THEIRPASS"
>
> They just needed to be a little more patient ;-) IIRC, the createlang
> script invokes psql four or five times, so if you are using password
> authentication you're going to have to enter the password four or five
> times.
>
> I agree, this isn't particularly user-friendly ... but then, password
> auth is inherently not user-friendly for something you invoke
> frequently. You might want to look at the other auth methods.
>
> regards, tom lane
Thanks a lot Tom, that do solves the first part of my problem...
Has anyone an idea about the second part, that is, one the
authentification passed, this error message:
"$>createlang plpgsql theirdb
createlang: A function named 'plpgsql_call_handler' already exists.
Installation aborted." ?
Actually, here's the situation on the base (results from "select * from
pg_language")
For template1:
lanname | lanispl | lanpltrusted | lanplcallfoid |
lancompiler
----------+---------+--------------+---------------+-------------
internal | f | f |
0 | n/a
C | f | f |
0 | /bin/cc
sql | f | f |
0 | postgres
For theirdb: (the "user" db)
lanname | lanispl | lanpltrusted | lanplcallfoid |
lancompiler
----------+---------+--------------+---------------+-------------
internal | f | f |
0 | n/a
C | f | f |
0 | /bin/cc
sql | f | f |
0 | postgres
For myowndb: (the very first db i created an onto which i installed
plpgsql without any trouble)
lanname | lanispl | lanpltrusted | lanplcallfoid |
lancompiler
----------+---------+--------------+---------------+-------------
internal | f | f |
0 | n/a
C | f | f |
0 | /bin/cc
sql | f | f |
0 | postgres
plpgsql | t | t | 56992 |
PL/pgSQL
Is there any way to "reference" (inherit ?) the plpgsql language installed
for myowndb, and thus making it accessible for the other databases ?
Isn't there a inherit procedure to make any database inherit template1's
installed language ?
(I would have to drop plpgsql from myowndb and reinstall it for template1,
but there shouldn't be a problem as long as I know the right procedure)
Any idea to do this, even with very non user-friendly SQL queries ?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: bayet@enseirb.fr, tgl@sss.pgh.pa.us
Subject: Re: How to made available for a database an already installed language on another database ?
In-Reply-To: <3A6586AD.4BEA606@enseirb.fr>
References: <3A65150E.5AFF75CC@enseirb.fr> <15810.979706083@sss.pgh.pa.us> <3A6586AD.4BEA606@enseirb.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox