Re: PL/PGSQL CURSOR looping/iteration - PG 8.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: cyw(at)dls(dot)net
Cc: "Postgres General List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PL/PGSQL CURSOR looping/iteration - PG 8.3
Date: 2008-10-08 15:55:09
Message-ID: 9705.1223481309@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<cyw(at)dls(dot)net> writes:
> I see some proposal for implementing FOR loop for cursor in PG 8.4, but I could not found documentaion on how to loop or iterate thru a cursor in PG 8.3 or earler versions?

LOOP
FETCH ...;
EXIT WHEN NOT FOUND;
...
END LOOP;

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Wojciech Strzałka 2008-10-08 16:21:41 Re: Stats collector eats my CPU
Previous Message cyw 2008-10-08 15:48:22 PL/PGSQL CURSOR looping/iteration - PG 8.3