2009/3/4  <inf200...@ucf.edu.cu>:
>
> probe y me da un erroe en  el psql
>
> ERROR: set-valued function called in context that cannot accept a set
> CONTEXTO: PL/pgSQL function "test3" line 5 at return next
>

si pero muestra exactamente "cuando" te da el error, por lo que dices
no queda totalmente claro...
ahora como yo soy adivino y he visto en el pasado se que ese error te
dio al tratar de ejecutar la funcion, probablemente trataste de
ejecutarlo asi: "select test3();" y debiste haberlo hecho asi: "select
* from test3();"

aunque para algo tan simple pudiste haber usado RETURN QUERY como te
indique antes o mejor aun una funcion SQL que quedaria algo asi:

CREATE OR REPLACE FUNCTION test3() RETURNS SETOF data_user_table AS
$$
SELECT * FROM data_user_table ;
$$
LANGUAGE 'sql';

-- 
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157
--
TIP 7: no olvides aumentar la configuración del "free space map"

Responder a