plpgsql language not recognized - Mailing list pgsql-novice

From David Merrill
Subject plpgsql language not recognized
Date
Msg-id 20001221105129.A10690@lupercalia.net
Whole thread Raw
Responses Re: plpgsql language not recognized  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
I am trying to create a function, and I am getting the following error
message:

ERROR:  Unrecognized language specified in a CREATE FUNCTION:
'plpgsql'. Recognized languages are sql, C, internal and the created
procedural languages.

This is the text of the function:


CREATE FUNCTION rational (int1, int2) RETURNS text AS '
DECLARE
    numerator ALIAS FOR $1;
    denominator ALIAS FOR $2;
    txtRational text;
BEGIN
    txtRational := to_char(numerator,''999999'');
    RETURN txtRational;
END;
' LANGUAGE 'plpgsql';


This is my first function, and obviously it isn't complete yet. It is
supposed to take two integer values, used to store the numerator and
denominator of a rational value, and return it as a string in the form
'numerator/denominator' when it is finished.

Any help much appreciated.

tia,
David


--
Dr. David C. Merrill                     http://www.lupercalia.net
Linux Documentation Project                dmerrill@lupercalia.net
Collection Editor & Coordinator            http://www.linuxdoc.org
                                       Finger me for my public key

--
I stopped believing in Santa Claus when I was six. Mother took me to see him in a department store and he asked for my
autograph.
        -- Shirley Temple


pgsql-novice by date:

Previous
From: "Rob Arnold"
Date:
Subject: RE: Capturing all output from psql into a file
Next
From: Tom Lane
Date:
Subject: Re: plpgsql language not recognized