Re: Return cursor - Mailing list pgsql-general

From Jacob Vennervald Madsen
Subject Re: Return cursor
Date
Msg-id 1061827348.1110.68.camel@jvennervald.intra.proventum.net
Whole thread Raw
In response to Return cursor  (Carmen Gloria Sepulveda Dedes <csepulveda@atichile.com>)
List pgsql-general
CREATE FUNCTION reffunc2() RETURNS refcursor AS '
 DECLARE
         ref refcursor;
 BEGIN
         OPEN ref FOR SELECT col FROM test;
         RETURN ref;
 END;
 ' LANGUAGE 'plpgsql';

On Mon, 2003-08-25 at 17:05, Carmen Gloria Sepulveda Dedes wrote:
> Hi!
>
> I need to return a cursor from a function/procedure?
> How can I do it?
>
> Thanks,
>
> CGS
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
>
--
Venlig hilsen / Best regards,
Jacob Vennervald
System Developer
Proventum Solutions ApS
Tuborg Boulevard 12
2900 Hellerup
Denmark
Phone:     +45 36 94 41 66
Mobile:    +45 61 68 58 51



pgsql-general by date:

Previous
From: Carmen Gloria Sepulveda Dedes
Date:
Subject: Return cursor
Next
From: Chris Travers
Date:
Subject: Re: Replication Ideas