Updated on 2025-02-27 GMT+08:00

PQnfields

Description

Returns the number of columns (fields) in each row of the query result.

Prototype

int PQnfields(const PGresult *res);

Parameter

Table 1 PQnfields parameters

Keyword

Description

res

Operation result handle.

Return Value

Value of the int type

Example

For details, see Typical Application Development Examples.