Re: cursors

From: Cesar Alvarez <c(dot)alvarezx66(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PGSQL GEneral Mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: cursors
Date: 2007-11-24 22:29:12
Message-ID: 4748A5B8.5030708@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks,
what will be the syntax for that type of for?

Pavel Stehule wrote:
> On 24/11/2007, Cesar Alvarez <c(dot)alvarezx66(at)gmail(dot)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
>>
>>
>>
>>
>
>

Attachment Content-Type Size
c_alvarezx66.vcf text/x-vcard 126 bytes

In response to

  • Re: cursors at 2007-11-24 22:23:32 from Pavel Stehule

Responses

  • Re: cursors at 2007-11-24 22:41:00 from Pavel Stehule

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2007-11-24 22:41:00 Re: cursors
Previous Message Pavel Stehule 2007-11-24 22:23:32 Re: cursors