Updated on 2024-06-03 GMT+08:00

PQgetvalue

Description

Returns a single threshold for a row of PGresult. Row and 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* PQgetvalue(const PGresult* res, int tup_num, int field_num);

Parameter

Table 1 PQgetvalue parameters

Keyword

Description

res

Operation result handle.

row_number

Number of rows.

column_number

Number of columns.

Return Value

For data in text format, PQgetvalue returns a null-terminated string representation of the threshold.

For binary data, the value is a binary representation determined by the typsend and typreceive functions of the data type.

If the threshold is empty, an empty string is returned.