Content-Length: 265737 | pFad | http://github.com/postgrespro/postgres_cluster/commit/941e47fc43cc3d80bfd4112e013a1d11235ead6a

51 Doc: document libpq's restriction to INT_MAX rows in a PGresult. · postgrespro/postgres_cluster@941e47f · GitHub
Skip to content

Commit 941e47f

Browse files
committed
Doc: document libpq's restriction to INT_MAX rows in a PGresult.
As long as PQntuples, PQgetvalue, etc, use "int" for row numbers, we're pretty much stuck with this limitation. The documentation formerly stated that the result of PQntuples "might overflow on 32-bit operating systems", which is just nonsense: that's not where the overflow would happen, and if you did reach an overflow it would not be on a 32-bit machine, because you'd have OOM'd long since. Discussion: https://postgr.es/m/CA+FnnTxyLWyjY1goewmJNxC==HQCCF4fKkoCTa9qR36oRAHDPw@mail.gmail.com
1 parent bc95e58 commit 941e47f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/src/sgml/libpq.sgml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3061,9 +3061,10 @@ void PQclear(PGresult *res);
30613061

30623062
<listitem>
30633063
<para>
3064-
Returns the number of rows (tuples) in the query result. Because
3065-
it returns an integer result, large result sets might overflow the
3066-
return value on 32-bit operating systems.
3064+
Returns the number of rows (tuples) in the query result.
3065+
(Note that <structname>PGresult</> objects are limited to no more
3066+
than <literal>INT_MAX</> rows, so an <type>int</> result is
3067+
sufficient.)
30673068

30683069
<synopsis>
30693070
int PQntuples(const PGresult *res);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/941e47fc43cc3d80bfd4112e013a1d11235ead6a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy