[pgsql-ayuda] problema con funciones

Sergio Cisternas scisternas@yx.cl
Fri, 20 Jun 2003 15:03:17 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_0034_01C3373D.14723E70
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

hola
como creo una funci=F3n que devuelva un recorset=20

create o replace function xxx() returns ???
as '
declare
    rs ???;

begin
    rs:=3D(select * from xxx) ;
    return rs ;
end '
laguage 'plpgsql' ;

no conozco el tipo de dato recordset
------=_NextPart_000_0034_01C3373D.14723E70
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>hola</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>como creo una funci=F3n que devuelva un =
recorset=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>create o replace function xxx() returns =

???</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>as '</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>declare</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; rs ???;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>begin</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; rs:=3D(select * from =
xxx)=20
;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; return rs =
;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>end '</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>laguage 'plpgsql' ;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>no conozco el tipo de dato=20
recordset</FONT></DIV></BODY></HTML>

------=_NextPart_000_0034_01C3373D.14723E70--