Re: Create Function... ERROR: language "plpgsql" does

From: darren(at)crystalballinc(dot)com
To: Thomas LeBlanc <thomasatiem(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Create Function... ERROR: language "plpgsql" does
Date: 2003-10-13 19:09:32
Message-ID: Pine.LNX.4.44.0310131507040.28947-100000@thread.crystalballinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You do not have the language installed in the database.

use the createlang function in the bin directory and create the langiage
for the data base i.e.

createlang -d dbname plpgsql

HTH
Darren

On Mon, 13 Oct 2003, Thomas LeBlanc wrote:

> I copied an example from the help:
>
> CREATE FUNCTION somefunc() RETURNS integer AS '
> DECLARE
> quantity integer := 30;
> BEGIN
> RAISE NOTICE ''Quantity here is %'', quantity; -- Quantity here is 30
> quantity := 50;
> --
> -- Create a subblock
> --
> DECLARE
> quantity integer := 80;
> BEGIN
> RAISE NOTICE ''Quantity here is %'', quantity; -- Quantity here is
> 80
> END;
>
> RAISE NOTICE ''Quantity here is %'', quantity; -- Quantity here is 50
>
> RETURN quantity;
> END;
> ' LANGUAGE plpgsql
>
>
> Ran it is a SQL window from pgAdmin and got this error:
>
> ERROR: language "plpgsql" does not exist
>
> Thanks,
> Thomas LeBlanc
>
> _________________________________________________________________
> Share your photos without swamping your Inbox. Get Hotmail Extra Storage
> today! http://join.msn.com/?PAGE=features/es
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Darren Ferguson

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sean Chittenden 2003-10-13 19:10:23 Re: go for a script! / ex: PostgreSQL vs. MySQL
Previous Message Sean Chittenden 2003-10-13 19:04:46 Re: go for a script! / ex: PostgreSQL vs. MySQL