From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Eliana Gutierrez <egp1962(at)yahoo(dot)com(dot)au> |
Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: Procedure en postgres |
Date: | 2006-11-06 13:31:14 |
Message-ID: | 20061106133114.GD18367@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Eliana Gutierrez escribió:
> La funcion de alvaro :
>
> CREATE OR REPLACE FUNCTION myfuncion3()
> RETURNS SETOF record AS
> $BODY$
> SELECT
> processes."PT_DLL_ID",
> processes."PT_P_ID"
> FROM processes JOIN dllregistry ON processes."PT_DLL_ID" = dllregistry."DLLT_DLL_ID"
> JOIN processregistry ON processes."PT_P_ID" = processregistry."PR_P_ID"
> AND processes."PT_DLL_ID" = processregistry."PR_DLL_ID"
> WHERE processes."PT_STATUS" = 0
> ORDER BY processes."PT_DLL_ID", processes."PT_P_ID", processes."PT_CONTEXT";
> $BODY$
> LANGUAGE 'sql' VOLATILE;
>
>
> devuelve n row (en este ej 3) con un solo string separando las columns por comas
Supongo que la estas llamando asi:
select myfunction3();
trata asi:
select * from myfunction3();
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2006-11-06 13:35:16 | Re: Fwd: ecpg, libpq, y php |
Previous Message | Roberto Guevara | 2006-11-06 13:30:18 | Re: Fwd: ecpg, libpq, y php |