Unix Technical Forum

PL/pgSQL: FOT Loops vs Cursors

This is a discussion on PL/pgSQL: FOT Loops vs Cursors within the pgsql Novice forums, part of the PostgreSQL category; --> After reading the manual (8.0: pages 582, 584). I am not certain what real advantage there is to using ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 08:29 PM
Van Ingen, Lane
 
Posts: n/a
Default PL/pgSQL: FOT Loops vs Cursors

After reading the manual (8.0: pages 582, 584). 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 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 08:30 PM
Mike G.
 
Posts: n/a
Default Re: PL/pgSQL: FOT Loops vs Cursors

See page 587. Cursors can be referenced by other functions and be created semi-dynamically.

On Thu, Feb 10, 2005 at 01:53:42PM -0500, Van Ingen, Lane wrote:
> After reading the manual (8.0: pages 582, 584). 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 7: don't forget to increase your free space map settings


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:16 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com