Re: Help with functions - Mailing list pgsql-general

From Brandon Craig Rhodes
Subject Re: Help with functions
Date
Msg-id w6heakt60l.fsf@guinness.ts.gatech.edu
Whole thread Raw
In response to Help with functions  ("Patrick Bye (WFF)" <PBYE@Westfair.CA>)
List pgsql-general
"Patrick Bye (WFF)" <PBYE@Westfair.CA> writes:

> CREATE FUNCTION getprice(text, text, text, text) RETURNS float8 AS 'DECLARE
>    v_itemnum ALIAS FOR $1;
>    v_custnum ALIAS FOR $2;
>    v_pcid ALIAS FOR $3;
>    v_branch ALIAS FOR $4;
> BEGIN
> RETURN 0;
> END getprice;
> '  LANGUAGE 'plpgsql';

Try changing the `END getprice;' to just `END;' like the examples in
the manual.  Note that the error message should have pointed you to
the specific line in the function where this error lay (with lines
counting from the beginning of the function, not the file).

--
Brandon Craig Rhodes                         http://www.rhodesmill.org/brandon
Georgia Tech                                            brandon@oit.gatech.edu

pgsql-general by date:

Previous
From: "Patrick Bye (WFF)"
Date:
Subject: Help with functions (Never mind)
Next
From: "Cristian Custodio"
Date:
Subject: Re: Help with functions