Re: help -- cursor inside a function
| От | JanWieck@t-online.de (Jan Wieck) |
|---|---|
| Тема | Re: help -- cursor inside a function |
| Дата | |
| Msg-id | 200007051658.SAA10939@hot.jw.home обсуждение исходный текст |
| Ответ на | help -- cursor inside a function (jprem <jprem@srmsoft.co.in>) |
| Список | pgsql-general |
jprem wrote:
> hello ,
> i have a procedure as below.
>
> -------------------------------------------------------------------------------------------------------------
>
> create function retrec(integer) returns integer
> as
> 'declare
> uid alias for $1;
> begin
> declare retrec_cur cursor for select * from jd_user_master where
> um_user_id>uid;
> if found then
> fetch 1 from retrec_cur;
> move next from retrec_cur;
> return 1;
> end if;
> end;'
> language 'plpgsql';
>
-------------------------------------------------------------------------------------------------------------------------
PL/pgSQL cannot deal with cursors.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #
В списке pgsql-general по дате отправления: