Re: passing cursors from one PL function to another

Поиск
Список
Период
Сортировка
От Martín Marqués
Тема Re: passing cursors from one PL function to another
Дата
Msg-id CABeG9Lvc4r9srsuS=v=qCif4C5nLZGWWebWqvx39weujKLvGow@mail.gmail.com
обсуждение исходный текст
Ответ на Re: passing cursors from one PL function to another  (Pavel Stehule <pavel.stehule@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: passing cursors from one PL function to another
Следующее
От: JD Wong
Дата:
Сообщение: dropdb: database removal failed: active sessions