From: | JanWieck(at)t-online(dot)de (Jan Wieck) |
---|---|
To: | PostgreSQL GENERAL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: help -- cursor inside a function |
Date: | 2000-07-05 16:58:10 |
Message-ID: | 200007051658.SAA10939@hot.jw.home |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Jeffery Collins | 2000-07-05 16:59:12 | lztext and compression ratios... |
Previous Message | The Hermit Hacker | 2000-07-05 16:52:48 | Re: responses to licensing discussion |