Received: from neouvielle.enseirb.fr (neouvielle.enseirb.fr [147.210.18.138]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0HBYE009121 for ; Wed, 17 Jan 2001 06:34:14 -0500 (EST) (envelope-from bayet@enseirb.fr) Received: from enseirb.fr (bayet.mds [172.16.8.139]) by neouvielle.enseirb.fr (8.9.3/8.9.3) with ESMTP id MAA13244; Wed, 17 Jan 2001 12:32:57 +0100 (MET) Message-ID: <3A6586AD.4BEA606@enseirb.fr> Date: Wed, 17 Jan 2001 12:49:01 +0100 From: Richard Bayet X-Mailer: Mozilla 4.7 [fr] (Win98; I) X-Accept-Language: fr MIME-Version: 1.0 To: Tom Lane CC: pgsql-admin@postgresql.org Subject: Re: How to made available for a database an already installed language on another database ? References: <3A65150E.5AFF75CC@enseirb.fr> <15810.979706083@sss.pgh.pa.us> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.postgresql.org id f0HBYF009127 X-Archive-Number: 200101/95 X-Sequence-Number: 469 Tom Lane a écrit : > Richard Bayet 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 ?