X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3DAF0D1B53A for ; Tue, 2 Sep 2003 07:54:25 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 34354-10 for ; Tue, 2 Sep 2003 04:53:55 -0300 (ADT) Received: from smtp014.mail.yahoo.com (smtp014.mail.yahoo.com [216.136.173.58]) by svr1.postgresql.org (Postfix) with SMTP id EBF14D1B4F0 for ; Tue, 2 Sep 2003 04:53:52 -0300 (ADT) Received: from adsl24.226.axelero.hu (HELO loser2000) (sbaudry@195.228.226.24 with login) by smtp.mail.vip.sc5.yahoo.com with SMTP; 2 Sep 2003 07:53:53 -0000 Reply-To: From: "Sebastien Baudry" To: "Admin Postgres" Subject: language "plpgsql" does not exist Date: Tue, 2 Sep 2003 09:55:14 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/9 X-Sequence-Number: 10097 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