Updated on 2024-05-07 GMT+08:00

PQntuples

Function

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

Prototype

int PQntuples(const PGresult* res);

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.

Parameter

Table 1 PQntuples parameters

Keyword

Parameter Description

res

Operation result handle.

Return Value

Value of the int type

Examples

For details, see Examples.