Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6cbee65

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'repretty much stuck with this limitation. The documentation formerly statedthat the result of PQntuples "might overflow on 32-bit operating systems",which is just nonsense: that's not where the overflow would happen, andif you did reach an overflow it would not be on a 32-bit machine, becauseyou'd have OOM'd long since.Discussion:https://postgr.es/m/CA+FnnTxyLWyjY1goewmJNxC==HQCCF4fKkoCTa9qR36oRAHDPw@mail.gmail.com
1 parent2e70d6b commit6cbee65

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
@@ -3199,9 +3199,10 @@ void PQclear(PGresult *res);
31993199

32003200
<listitem>
32013201
<para>
3202-
Returns the number of rows (tuples) in the query result. Because
3203-
it returns an integer result, large result sets might overflow the
3204-
return value on 32-bit operating systems.
3202+
Returns the number of rows (tuples) in the query result.
3203+
(Note that <structname>PGresult</> objects are limited to no more
3204+
than <literal>INT_MAX</> rows, so an <type>int</> result is
3205+
sufficient.)
32053206

32063207
<synopsis>
32073208
int PQntuples(const PGresult *res);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp