Add a "row processor" API to libpq for better handling of large results.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 92785dac2ee7026948962cd61c4cd84a2d052772
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2012-04-04T22:27:56Z
Releases: 9.2.0
Add a "row processor" API to libpq for better handling of large results.

Traditionally libpq has collected an entire query result before passing
it back to the application.  That provides a simple and transactional API,
but it's pretty inefficient for large result sets.  This patch allows the
application to process each row on-the-fly instead of accumulating the
rows into the PGresult.  Error recovery becomes a bit more complex, but
often that tradeoff is well worth making.

Kyotaro Horiguchi, reviewed by Marko Kreen and Tom Lane

Files