Updated on 2025-03-13 GMT+08:00

PQfname

Description

Returns the column name associated with the given column number. Column numbers start from 0. The caller should not release the result directly. The result will be released when the associated PGresult handle is passed to PQclear.

Prototype

char* PQfname(const PGresult* res, int field_num);

Parameters

Table 1 PQfname parameters

Keyword

Description

res

Handle to the operation result.

field_num

Number of columns.

Return Values

char pointers.