Updated on 2025-05-29 GMT+08:00

PQntuples

Description

Returns the number of rows (tuples) in the query result.

Prototype

int PQntuples(const PGresult* res);

Parameters

Table 1 PQntuples parameters

Keyword

Description

res

Handle to the operation result.

PQntuples returns an integer result. An overflow may occur if the return value is out of the value range allowed in a 32-bit OS.

Return Values

Value of the int type

Examples

For details, see Typical Application Development Examples.