Re: create function - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: create function
Date
Msg-id Pine.BSF.4.10.10011011851350.72957-100000@megazone23.bigpanda.com
Whole thread Raw
In response to create function  (Pam Withnall <Pamw@zoom.com.au>)
List pgsql-hackers
What version are you using?  On a 7.0.2 freebsd machine,
I cut and paste the below function and query and had
no problems.

Stephan Szabo
sszabo@bigpanda.com

On Thu, 2 Nov 2000, Pam Withnall wrote:

> 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?
> 




pgsql-hackers by date:

Previous
From: Pam Withnall
Date:
Subject: create function
Next
From: Bruce Momjian
Date:
Subject: Re: Re: [GENERAL] 7.0 vs. 7.1 (was: latest version?)