Some applications require large amounts of data that have to be read by the database. Usually, two major cases can be distinguished:
In this section, both the cases will be covered because they have slightly different requirements.
Cursors are a fundamental concept provided by all reasonable relational databases. However, cursors are often ignored and not used the way they should be, which leads to problems all along the way.
Why would anybody want to use a cursor, and what is it all about anyway? Consider the following example:
SELECT * FROM very_large_table;
For PostgreSQL, ...