Re: language "plpgsql" does not exist

From: "Glenn Wiorek" <gwiorek(at)jmlafferty(dot)com>
To: <sebastien(dot)baudry(at)baudry-engineering(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: language "plpgsql" does not exist
Date: 2003-09-02 12:49:03
Message-ID: 01d201c37150$96ab0aa0$143264c8@jmlafferty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

And if you do the below with template1 - It will be available in every
database you create after that .

> You have to install the procedural language into each database as such:
>
> 1. su - postgres
> 2. createlang plpgsql [your dbname here]

----- Original Message -----
From: "Renney Thomas" <renneyt(at)yahoo(dot)com>
To: <sebastien(dot)baudry(at)baudry-engineering(dot)com>
Cc: "Admin Postgres" <pgsql-admin(at)postgresql(dot)org>
Sent: Tuesday, September 02, 2003 3:12 AM
Subject: Re: [ADMIN] language "plpgsql" does not exist

> You have to install the procedural language into each database as such:
>
> 1. su - postgres
> 2. createlang plpgsql [your dbname here]
>
>
>
> Sebastien Baudry wrote:
>
> >Hi everybody.
> >I'm a new born in the PostGreSQL domain (usually deal with Oracle or SQL
> >Server) and I got the following error when trying to create a function
using
> >the default language plpgsql: language "plpgsql" does not exist
> >I was not able to find clues on the net to help me to solve this problem,
> >that's why I'm sending this post now.
> >
> >I just installed the version 7.3.4 of PostGreSQL (basic installation).
> >
> >Here the source of the function I try to create:
> >-------------
> >CREATE OR REPLACE FUNCTION ts_groupEdit
> >(VARCHAR,INTEGER,VARCHAR,VARCHAR,INTEGER,INTEGER) RETURNS INTEGER AS '
> >
> >DECLARE
> >vi_name ALIAS FOR $1;
> >vi_companyId ALIAS FOR $2;
> >vi_description ALIAS FOR $3;
> >vi_rights ALIAS FOR $4;
> >vi_debug ALIAS FOR $5;
> >v_groupId INTEGER;
> >BEGIN
> > SELECT groupId INTO v_groupId
> > FROM Groups
> > WHERE companyId=vi_companyid AND
> > name=vi_name;
> >
> > IF v_groupId IS NOT NULL THEN
> > UPDATE GROUPS SET description=vi_description
> > WHERE groupId=v_groupId;
> > ELSE
> > INSERT INTO Groups (companyId, name, description)
> > VALUES (vi_companyid, vi_name, vi_description);
> > END IF;
> >
> > RETURN 0;
> >END; '
> >LANGUAGE 'plpgsql';
> >-------------
> >
> >
> >Any help will be welcome.
> >May be I have to load or install the plpgsql module, but I didn't find
such
> >instruction in the documentation so I guess it is there by default.
> >
> >Seb.
> >
> >--
> >Sébastien BAUDRY - DBA Oracle/MS-SQL & Project Manager
> >BAUDRY ENGINEERING BT. H-1025 Budapest Verhalom utca. 31/D. I/8.
> >@.: sebastien(dot)baudry(at)baudry-engineering(dot)com
> >mobile.: +36-30-392-0279 / tel: +36-1-326-0241 / fax: +36-1-326-0241
> >http://www.baudry-engineering.com
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 7: don't forget to increase your free space map settings
> >
> >
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Villalba, Juan Jose - (Col) 2003-09-02 13:21:52 Version number question
Previous Message Somasekhar Bangalore 2003-09-02 12:08:52 Re: postgresql and replication