# Method Postgres.postgres_result()->fetch_fields()

Method fetch_fields

  `array(mapping(string:mixed)) fetch_fields()`

Description

  Returns an array with an entry for each field, each entry is a mapping with the following fields:

  `"name" : string` | Name of the column
  `"type" : int` | The type ID of the field. This is the database's internal representation type ID.
  `"length" : int|string` | Can be an integer (the size of the contents in bytes) or the word "variable".

Note

  For char() fields, length is to be intended as the MAXIMUM length of the field. This is not part of the interface specifications in fact, but a driver-choice. In fact char() fields are for Postgres _FIXED_ length fields, and are space-padded. If CUT_TRAILING_SPACES is defined when the driver is compiled (default behavior) it will cut such spaces.