From: | Frank G Hahn <efgeho(at)cs(dot)auc(dot)dk> |
---|---|
To: | p(dot)lam(at)altavista(dot)net |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Pg/PLSQL Errors!! |
Date: | 2000-05-30 17:01:08 |
Message-ID: | Pine.GSO.4.21.0005301859470.3719-100000@borg.cs.auc.dk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(dot)lam(at)altavista(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-05-30 17:19:35 | Re: Pg/PLSQL Errors!! |
Previous Message | Tulassay Zsolt | 2000-05-30 16:57:32 | Re: Pg/PLSQL Errors!! |