Re: help with "plpgsql"

Поиск
Список
Период
Сортировка
Искать

Re: help with "plpgsql"

От:
"Pau Marc Munoz Torres" <paumarc@gmail.com>
Дата:
Hi everybody

I trying to upload some plpsql functions to postgresql database using a perl script and i get the following error


 psql:/usr/local/Make2D-DB_II
/pgsql/make2db_functions.pgsql:85: ERROR:  language "plpgsql" does not exist
HINT:  Use CREATE LANGUAGE to load the language into the database.


and then when I try to create the language, i get

geldb=# CREATE LANGUAGE plpgsql;

ERROR:  language "plpgsql" already exists

anybody knows what's wrong?

Thanks

--
Pau Marc Muñoz Torres

Laboratori de Biologia Computacional  
Institut de  Biotecnologia   i Biomedicina Vicent Villar                                    
Universitat Autonoma de Barcelona
E-08193 Bellaterra (Barcelona)
              
telèfon: 93 5812807
Email : paumarc.munoz@bioinf.uab.cat

Re: help with "plpgsql"

От:
Craig Ringer <craig@postnewspapers.com.au>
Дата:
Pau Marc Munoz Torres wrote:
> ERROR:  language "plpgsql" already exists
>
> anybody knows what's wrong?
>   
Is there any chance you might be connecting to a different database with 
the perl script and with psql? Procedural languages must be installed 
into a particular database.

--
Craig Ringer

Re: help with "plpgsql"

От:
Christophe <xof@thebuild.com>
Дата:
On Apr 21, 2008, at 8:51 AM, Pau Marc Munoz Torres wrote:
>  psql:/usr/local/Make2D-DB_II
> /pgsql/make2db_functions.pgsql:85: ERROR:  language "plpgsql" does  
> not exist
> HINT:  Use CREATE LANGUAGE to load the language into the database.
>
>
> and then when I try to create the language, i get
>
> geldb=# CREATE LANGUAGE plpgsql;
>
> ERROR:  language "plpgsql" already exists

Are you certain that you are dealing with the same database in both  
situations?

Re: help with "plpgsql"

От:
Shane Ambler <pgsql@Sheeky.Biz>
Дата:
Pau Marc Munoz Torres wrote:
> Hi everybody
> 
> I trying to upload some plpsql functions to postgresql database using a perl
> script and i get the following error
> 
> 
>  psql:/usr/local/Make2D-DB_II
> /pgsql/make2db_functions.pgsql:85: ERROR:  language "plpgsql" does not exist
> HINT:  Use CREATE LANGUAGE to load the language into the database.
> 
> 
> and then when I try to create the language, i get
> 
> geldb=# CREATE LANGUAGE plpgsql;
> 
> ERROR:  language "plpgsql" already exists
> 
> anybody knows what's wrong?
> 
> Thanks
> 

My first guess would be what db are you connected to?

Is the script connected to the same db you are connected to when you run 
psql?

I would probably add the CREATE LANGUAGE command to the start of the 
perl script.


-- 

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz
FAQ