pg_field_type() returns a string containing the type name of the given field_number in the given PostgreSQL result resource. Field numbering starts at 0.
See the example given at the pg_field_name() page.
Note: This function used to be called pg_fieldtype().