Re: FOR vs Cursors - Mailing list pgsql-general

From Sim Zacks
Subject Re: FOR vs Cursors
Date
Msg-id cvfget$2js7$1@news.hub.org
Whole thread Raw
In response to FOR vs Cursors  ("Van Ingen, Lane" <lvaningen@ESNCC.com>)
List pgsql-general
One advantage of a cursor over a for loop is that it makes your code more
portable.
It also allows you to bring existing code over without having to majorly
rewrite.

""Van Ingen, Lane"" <lvaningen@ESNCC.com> wrote in message
news:A3FF4275060B76459B5C08A64AE330C86A37@twmail.esncc.com...
> After reading the manual (8.0). I am not certain what real advantage there
is to using a cursor
> over using a FOR loop. since FOR automatically uses a cursor anyway. They
both avoid
> memory problems. Have I missed something or are there other reasons?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>



pgsql-general by date:

Previous
From: "Don Doumakes"
Date:
Subject: Recovering db from cracked server
Next
From: Dorian Büttner
Date:
Subject: Re: psql terminal / quote-key