Trouble with PL/pgSQL

From: "Kevin Willems" <kdwillems(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Trouble with PL/pgSQL
Date: 2001-04-03 22:30:35
Message-ID: fasy6.1534$Tfq.12910695@tomcat.sk.sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I wrote the following test function:

CREATE FUNCTION tester(text)
RETURNS text
AS 'DECLARE
str text;
BEGIN
str := upper($1);
RETURN str;
END;'
LANGUAGE'plpgsql'

This runs OK. However, when I go to use it as follows:

SELECT tester('sometext');

I get the error:

NOTICE: plpgsql: ERROR during compile of tester near line 1
"RROR: parse error at or near "

Does anyone know why this is happening? Any help would really be
appreciated.

- Kevin Willems

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc Wrubleski 2001-04-03 22:48:20 Re: Re: slow server
Previous Message Marc Wrubleski 2001-04-03 22:22:10 Re: Re: slow server