create function

From: Pam Withnall <Pamw(at)zoom(dot)com(dot)au>
To: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: create function
Date: 2000-11-02 02:46:08
Message-ID: D10ACC8031A3FD47A7860D3590D6A1D1F594@zoom-ads.zoomnet.zoom.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have installed plpgsql procedural language ok,
I could not get any functions to work.
I tried the most simple function as documented:
CREATE FUNCTION sptest3 (int4) RETURNS int4 AS
'BEGIN
RETURN $1+1;
END;' LANGUAGE 'plpgsql';

When i call the function from sql
SELECT sptest3(4) AS x;
I get the error:

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

can anybody help?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2000-11-02 02:53:25 Re: create function
Previous Message Tatsuo Ishii 2000-11-02 01:45:33 RE: WAL: postmaster won't start