This page in other versions: Unsupported versions: 7.1 / 7.2 / 7.3

fieldnum

Name

fieldnum -- get field number by name

Synopsis

fieldnum(name)

Parameters

name

field name (string).

Return Type

integer

field number (integer).

Exceptions

TypeError

Bad parameter type, or too many arguments.

ValueError

Unknown field name.

pg.error

Invalid query result, or invalid connection.

Description

fieldnum() method returns a field number from its name. It can be used to build a function that converts result list strings to their correct type, using a hardcoded table definition. The number returned is the field rank in the result values list.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group