Search Postgresql Archives

cursor vs. for _row in select...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can somebody help me to appreciate the difference between returning a
setof record with cursor or with for _row in select ... as in

http://people.planetpostgresql.org/xzilla/index.php?/archives/149-out-parameter-sql-plpgsql-examples.html

Once I use and define cursors read only, no scroll, insensitive (that
should give enough information to use the cursor as a standard query)
I see there is an interesting advantage over for _row in select: you
don't have to specify the output type.

Is there any hidden penalty using cursor vs. for _row in select?

What's the meaning of:
"which can be used to retrieve a small number of rows at a time out
of a larger query".

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux