Received: from mailhost.cs.auc.dk (root@mailhost.cs.auc.dk [130.225.194.2]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA56593 for ; Tue, 30 May 2000 13:01:20 -0400 (EDT) (envelope-from efgeho@cs.auc.dk) Received: from borg.cs.auc.dk (efgeho@borg.cs.auc.dk [130.225.194.125]) by mailhost.cs.auc.dk (8.9.3/8.9.3) with ESMTP id TAA25872; Tue, 30 May 2000 19:01:09 +0200 (MET DST) Date: Tue, 30 May 2000 19:01:08 +0200 (MET DST) From: Frank G Hahn To: p.lam@altavista.net cc: pgsql-sql@postgresql.org Subject: Re: Pg/PLSQL Errors!! In-Reply-To: <000530123634BP.00589@weba1.iname.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200005/203 Hi You need to make the call_handler and create the language plpgsql. Assuming postgres is installed in /usr/local/pgsql Example: -- Setup -- define the languages and the associated handlers CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS '/usr/local/pgsql/lib/plpgsql.so' LANGUAGE 'C'; CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL'; On Tue, 30 May 2000 p.lam@altavista.net wrote: > I am running PostgreSQL 6.5.3 on RedHat Linux 6.1 on a PC. > I am trying to use Pg/PLSQL. > > I even tried being conservative enough to copy the example code from > http://www.postgresql.org/docs/user/c40874340.htm as follows: > CREATE FUNCTION add_one (int4) RETURNS int4 AS ' > BEGIN > RETURN $1 + 1; > END; > ' LANGUAGE 'plpgsql'; > > > though, even that results in "ERROR: Unrecognized language specified in a CREATE FUNCTION: 'pl-pgsql'. Recognized languages are sql, C, internal and > the created procedural languages." > > I have tried variants including PLSQL,PG/PLSQL,PL/SQL,PGSQL and even 'internal > procedural language(s)' and 'created procedural language(s)' though with the same error. > > Does anyone know of the name of the postgreSQL's procedural language of form like > CREATE function funcName(arguments) returns returntype AS 'BEGIN > statement block END;' LANGUAGE '??????'; > > Many Thanks! > > > > ---------------------------------------------------------------- > Get your free email from AltaVista at http://altavista.iname.com >