Re: language "plpgsql" does not exist

From: Richard Huxton <dev(at)archonet(dot)com>
To: Bruce Young <hbrucey(at)yahoo(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: language "plpgsql" does not exist
Date: 2003-05-23 10:26:31
Message-ID: 200305231126.31947.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Friday 23 May 2003 7:48 am, Bruce Young wrote:
> i am trying to create functions only to get the above error in return.
> what do i need to do to get PL/PGSQL functions working?
> example:
>
> CREATE FUNCTION logfunc1(text) RETURNS timestamp AS '
> DECLARE
> logtxt ALIAS FOR $1;
> BEGIN
> INSERT INTO logtable VALUES (logtxt, ''now'');
> RETURN ''now'';
> END;
> ' LANGUAGE plpgsql;
>
> # ERROR: language "plpgsql" does not exist

You need to do a "CREATE LANGUAGE" or use the createlang command-line tool to
enable it in your database:

createlang plpgsql mydatabase

--
Richard Huxton

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Christoph Haller 2003-05-23 11:00:14 Re: Another sub-select problem...
Previous Message David Witham 2003-05-23 09:45:48 Re: language "plpgsql" does not exist