Re: passing cursors from one PL function to another - Mailing list pgsql-general

From Martín Marqués
Subject Re: passing cursors from one PL function to another
Date
Msg-id CABeG9Lvc4r9srsuS=v=qCif4C5nLZGWWebWqvx39weujKLvGow@mail.gmail.com
Whole thread Raw
In response to Re: passing cursors from one PL function to another  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
El día 29 de agosto de 2011 16:12, Pavel Stehule
<pavel.stehule@gmail.com> escribió:
> 2011/8/29 Martín Marqués <martin.marques@gmail.com>:
>>>
>>> refcursors can be dynamic defined
>>
>> OK, I'm totally lost. How do you define a dynamic cursor? Couldn't
>> find anything in the manuals.
>>
>
> DECLARE
>    curs1 refcursor;
> BEGIN
>  OPEN curs1 FOR EXECUTE 'SELECT ...';

OK, not that easy, but I think I got it working.

Thanks alot Pavel!

--
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: passing cursors from one PL function to another
Next
From: JD Wong
Date:
Subject: dropdb: database removal failed: active sessions