help with "plpgsql"

Started by Pau Marc Munoz Torresalmost 18 years ago6 messagesgeneral
Jump to latest
#1Pau Marc Munoz Torres
paumarc.munoz@bioinf.uab.cat

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

#2Pau Marc Munoz Torres
paumarc@gmail.com
In reply to: Pau Marc Munoz Torres (#1)
Re: help with "plpgsql"

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

#3Craig Ringer
craig@2ndquadrant.com
In reply to: Pau Marc Munoz Torres (#2)
Re: help with "plpgsql"

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

#4Christophe Pettus
xof@thebuild.com
In reply to: Pau Marc Munoz Torres (#2)
Re: help with "plpgsql"

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?

#5Shane Ambler
pgsql@Sheeky.Biz
In reply to: Pau Marc Munoz Torres (#2)
Re: help with "plpgsql"

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

#6A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: Pau Marc Munoz Torres (#1)
Re: help with "plpgsql"

am Mon, dem 21.04.2008, um 17:46:49 +0200 mailte Pau Marc Munoz Torres folgendes:

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?

Wild guess: you have different databases. The language exists in the
database 'geldb', but your perl-script works on an other database.

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net