Re: Problem with PL/pgSQL

From: "Mitch Vincent" <mitch(at)venux(dot)net>
To: Hans-Jürgen Schönig <hs(at)cybertec(dot)at>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem with PL/pgSQL
Date: 2001-02-25 03:47:36
Message-ID: 003f01c09edd$b185f080$0200000a@windows
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You need to do

CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
'/usr/local/pgsql/lib/plpgsql.so' LANGUAGE 'C';

And :

CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
HANDLER plpgsql_call_handler
LANCOMPILER 'PL/pgSQL';

----- Original Message -----
From: "Hans-Jürgen Schönig" <hs(at)cybertec(dot)at>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Saturday, February 24, 2001 10:01 AM
Subject: Problem with PL/pgSQL

> What is wrong with the following function?
>
> CREATE FUNCTION logfunc2 (text) RETURNS int AS '
> DECLARE
> text ALIAS FOR $1;
> BEGIN
> SELECT length(text);
> RETURN ''3'';
> END;
> ' LANGUAGE 'plpgsql';
>
> I get the following error:
>
> ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
>
> Recognized languages are sql, C, internal, and created
> procedural languages.
>
>
> According to my docs "plpgsql" should be ok.
>
> Hans
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Eric G. Miller 2001-02-25 04:26:35 Re: Problem with PL/pgSQL
Previous Message Ian Harding 2001-02-25 03:06:45 Re: Problem with PL/pgSQL