Re: cursors - Mailing list pgsql-general

From Pavel Stehule
Subject Re: cursors
Date
Msg-id 162867790711241423i6707b240gcefa41c43709a51f@mail.gmail.com
Whole thread Raw
In response to cursors  (Cesar Alvarez <c.alvarezx66@gmail.com>)
Responses Re: cursors  (Cesar Alvarez <c.alvarezx66@gmail.com>)
List pgsql-general
On 24/11/2007, Cesar Alvarez <c.alvarezx66@gmail.com> wrote:
>
>  Hello every one.
>  im trying to make a Loop and i found in the manual this.
>
>  FOR <target> IN <query> LOOP
>      <statements>
>  END LOOP
>
>  Can i use cursor instead of the Query in the loop?? ,
>  this es more legible than using the open/fetch/close of the cursor.
>
>  Regard Cesar Alvarez.

Hello

FOR statement use cursor internally. If you wont to use cursor
explicitly, you have to use WHILE loop.

Regards
Pavel Stehule

>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>
>

pgsql-general by date:

Previous
From: Cesar Alvarez
Date:
Subject: cursors
Next
From: Cesar Alvarez
Date:
Subject: Re: cursors