From: | Juan Francisco Diaz <j-diaz(at)publicar(dot)com> |
---|---|
To: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | Returning a setof integer |
Date: | 2003-08-26 20:44:39 |
Message-ID: | BB7130E7.10E%j-diaz@publicar.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi, me again!
Im trying to return a setof integer from various functions and in all of
them the message when executed is:
WARNING: plpgsql: ERROR during compile of buscabcollibro near line 6
ERROR: missing .. at end of SQL expression
The functions are like this:
CREATE OR REPLACE FUNCTION BUSCabColLibro(VARCHAR) RETURNS SETOF INTEGER AS
'
DECLARE
Libro ALIAS FOR $1;
res INTEGER;
BEGIN
FOR res IN select cabidaCol from CARPagina where IdLibro =
CAST(Libro AS CHAR) LOOP
RETURN NEXT res;
END LOOP;
return;
END;
' LANGUAGE 'plpgsql';
Thanks a lot
JuanF
(a newbie migrating dbs)
From | Date | Subject | |
---|---|---|---|
Next Message | David Rickard | 2003-08-26 21:38:15 | Database names and pg_dump |
Previous Message | Stephan Szabo | 2003-08-26 19:35:25 | Re: Can the following be done? |