From: | Juan Francisco Diaz <j-diaz(at)publicar(dot)com> |
---|---|
To: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | Returning SETOF INTEGER mystery... |
Date: | 2003-08-26 21:47:19 |
Message-ID: | BB713F97.113%j-diaz@publicar.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hello again, i found ou that no matter the function, if the return type is a
SETOF INTEGER, or a SETOF CUSTOMTYPE that includes at least ONE INTEGER
value, the error:
WARNING: plpgsql: ERROR during compile of buscarseccion near line 6
ERROR: missing .. at end of SQL expression
Shows up, is this a bug or am i doing something wrong?
Here goes another function that throws the same error ( I have plenty in
case you want to see them)
CREATE OR REPLACE FUNCTION BUSCarSeccion(VARCHAR) RETURNS SETOF
BusCarSeccion AS '
DECLARE
Libro ALIAS FOR $1;
res BusCarSeccion;
BEGIN
FOR res IN select alto,altoIntercita, espacioCabeza, EspacioFin,
idColor, idColorTexto from CARSeccion where IdLibro =
Libro LOOP
RETURN NEXT res;
END LOOP;
return;
END;
' LANGUAGE 'plpgsql';
JuanF
(a newbie with MANY questions)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Guerin | 2003-08-26 23:11:53 | Simple queries take forever to run |
Previous Message | Ron Johnson | 2003-08-26 21:47:01 | Re: Database names and pg_dump |