From: Sebastien Baudry <sbaudry@yahoo.com>
To: Admin Postgres <pgsql-admin@postgresql.org>
Subject: language "plpgsql" does not exist
Date: Tue, 2 Sep 2003 09:55:14 +0200
Message-ID: <KAECIKDEBEFAPMGIJGOGAEAKENAA.sbaudry@yahoo.com> (raw)
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.baudry@baudry-engineering.com
mobile.: +36-30-392-0279 / tel: +36-1-326-0241 / fax: +36-1-326-0241
http://www.baudry-engineering.com
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: sbaudry@yahoo.com
Subject: Re: language "plpgsql" does not exist
In-Reply-To: <KAECIKDEBEFAPMGIJGOGAEAKENAA.sbaudry@yahoo.com>
References: <KAECIKDEBEFAPMGIJGOGAEAKENAA.sbaudry@yahoo.com>
* 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