Re: cursors and for loops? - Mailing list pgsql-sql

From Tom Lane
Subject Re: cursors and for loops?
Date
Msg-id 15008.1081699255@sss.pgh.pa.us
Whole thread Raw
In response to cursors and for loops?  ("Dennis" <pg-user@calico-consulting.com>)
Responses Re: cursors and for loops?  ("Dennis" <pg-user@calico-consulting.com>)
List pgsql-sql
"Dennis" <pg-user@calico-consulting.com> writes:
> I am wondering if I can use a cursor in a for loop.

Something like
LOOP    FETCH ...;    EXIT WHEN NOT found;    ...END LOOP;

should do it.
        regards, tom lane


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: trigger/for key help
Next
From: elein
Date:
Subject: Re: SQL challenge--top 10 for each key value?