From: Richard Bayet <bayet@enseirb.fr>
To: pgsql-admin@postgresql.org
Subject: How to made available for a database an already installed language on another database ?
Date: Wed, 17 Jan 2001 04:44:14 +0100
Message-ID: <3A65150E.5AFF75CC@enseirb.fr> (raw)
Here's the trick: I had to do a PostgreSQL install as a unix user.
That's to say the postmaster process is ran under my login name, and all
the database files belong to me.
And so, my login name under this system was added (i presume when i
launched initdb) in pg_user as a PostgreSQL superuser.
I could therefore create my own database, access it, and add plpgsql
language support with createlang on my database.
I hadn't made any single change to pg_hba.conf, so the "trust" method
was prevailing.
Now here's the trick: I decided to allow people having their own
database on my server.
To do so, I create for them a database, and a password file for this
database.
In pg_hba.conf, I now use the "password passwordfile" authentification
method.
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"
I don't think it was an authentification problem because whenever they
(or I) put a wrong password, they (or I) got a "Password
authentification failed for user 'them'" ...
I added myself to the "theirdb" password file, and things got weirder
and weirder: now my shell hanged up, and I had to kill.
I changed authentification method for "theirdb" to "trust", and tried
again.
And now i get this:
"$>createlang plpgsql theirdb
createlang: A function named 'plpgsql_call_handler' already exists.
Installation aborted."
I tried to figure it out by myself, reading the docs for hours but
pfffrrrtt, could'nt get anything valuable.
I read that only database superusers can add language support for a
database, but eh, aren't I one since i have the usesuper attribute to
TRUE in pg_user (template1 database) ?
Due to the error report described a few lines above (about the handler
that already exists), I'm not sure managing to give a user the superuser
status would help in any way ...
Thanks for any piece of help ...
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
Subject: Re: How to made available for a database an already installed language on another database ?
In-Reply-To: <3A65150E.5AFF75CC@enseirb.fr>
References: <3A65150E.5AFF75CC@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