Re: Help with functions

From: Brandon Craig Rhodes <brandon(at)oit(dot)gatech(dot)edu>
To: "Patrick Bye (WFF)" <PBYE(at)Westfair(dot)CA>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Help with functions
Date: 2003-03-03 22:55:06
Message-ID: w6heakt60l.fsf@guinness.ts.gatech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Patrick Bye (WFF)" <PBYE(at)Westfair(dot)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(at)oit(dot)gatech(dot)edu

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Cristian Custodio 2003-03-03 22:56:06 Re: Help with functions
Previous Message Patrick Bye (WFF) 2003-03-03 22:38:33 Help with functions (Never mind)