select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Unsupported versions: 7.3 / 7.2 / 7.1
Historical version. PostgreSQL 7.2 reached end of support in February 2007. See the current manual for supported releases.

fieldname

Name

fieldname -- field number-name conversion

Synopsis

fieldname(i)

Parameters

i

field number (integer).

Return Type

string

field name.

Exceptions

TypeError

Bad parameter type, or too many arguments.

ValueError

Invalid field number.

pg.error

Invalid query result, or invalid connection.

Description

fieldname() method allows to find a field name from its rank number. It can be useful for displaying a result. The fields are in the same order than the result values.

Report a documentation issue

Read the upstream documentation. For corrections, first check the current manual.