Re: Problem with PL/pgSQL - Mailing list pgsql-general

From Ian Harding
Subject Re: Problem with PL/pgSQL
Date
Msg-id 3A9876C5.A4902DB3@pakrat.com
Whole thread Raw
In response to Problem with PL/pgSQL  (Hans-Jürgen Schönig <hs@cybertec.at>)
List pgsql-general
Hans-Jürgen Schönig wrote:

> 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

plpgsql is not installed by default.

createlang 'plpgsql'

from the command line should to the trick.


pgsql-general by date:

Previous
From: Matt Beauregard
Date:
Subject: Help with database locking
Next
From: "Martin Schweitzer"
Date:
Subject: Load fixed length records.