Unsupported versions: 7.3 / 7.2 / 7.1
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

SPI_fnumber

Name

SPI_fnumber -- Finds the attribute number for specified attribute

Synopsis

SPI_fnumber(tupdesc, fname)

Inputs

TupleDesc tupdesc

Input tuple description

char * fname

Field name

Outputs

int

Attribute number

Valid one-based index number of attribute
SPI_ERROR_NOATTRIBUTE if the named attribute is not found

Description

SPI_fnumber returns the attribute number for the attribute with name in fname.

Usage

Attribute numbers are 1 based.