Skip to content

Commit f0cb7f1

Browse files
committed
document that ntuples does not risk overflow
The parenthetical has been included in libpq docs since 9.3. This library already requires libpq >= 9.3.
1 parent 3903ee6 commit f0cb7f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Database/PostgreSQL/LibPQ.hsc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,9 +1203,9 @@ resultErrorField (Result fp) fieldcode =
12031203
-- values, these functions will act as though the result has zero rows
12041204
-- and zero columns.
12051205

1206-
-- | Returns the number of rows (tuples) in the query result. Because
1207-
-- it returns an integer result, large result sets might overflow the
1208-
-- return value on 32-bit operating systems.
1206+
-- | Returns the number of rows (tuples) in the query result. (Note
1207+
-- that PGresult objects are limited to no more than INT_MAX rows, so
1208+
-- an int result is sufficient.)
12091209
ntuples :: Result
12101210
-> IO Row
12111211
ntuples res = withResult res (return . toRow . c_PQntuples)

0 commit comments

Comments
 (0)