Retrieving query results

Igor Korot <ikorot01@gmail.com>

From: Igor Korot <ikorot01@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Date: 2017-08-22T18:19:58Z
Lists: pgsql-general
 Hi, ALL,
[quote]
PQntuples

Returns the number of rows (tuples) in the query result. Because it
returns an integer result, large result sets might overflow the return
value on 32-bit operating systems.

int PQntuples(const PGresult *res);
 [/quote]

Is there another way to not to overflow the result?

Thank you.


Commits

  1. Doc: document libpq's restriction to INT_MAX rows in a PGresult.

  2. Teach libpq to detect integer overflow in the row count of a PGresult.