You are here

function DatabaseSchema_pgsql::getFieldTypeMap in Drupal 7

This maps a generic data type in combination with its data size to the engine-specific data type.

Overrides DatabaseSchema::getFieldTypeMap

1 call to DatabaseSchema_pgsql::getFieldTypeMap()
DatabaseSchema_pgsql::processField in includes/database/pgsql/schema.inc
Set database-engine specific properties for a field.

File

includes/database/pgsql/schema.inc, line 261
Database schema code for PostgreSQL database servers.

Class

DatabaseSchema_pgsql

Code

function getFieldTypeMap() {

  // Put :normal last so it gets preserved by array_flip. This makes
  // it much easier for modules (such as schema.module) to map
  // database types back into schema types.
  // $map does not use drupal_static as its value never changes.
  static $map = array(
    'varchar:normal' => 'varchar',
    'char:normal' => 'character',
    'text:tiny' => 'text',
    'text:small' => 'text',
    'text:medium' => 'text',
    'text:big' => 'text',
    'text:normal' => 'text',
    'int:tiny' => 'smallint',
    'int:small' => 'smallint',
    'int:medium' => 'int',
    'int:big' => 'bigint',
    'int:normal' => 'int',
    'float:tiny' => 'real',
    'float:small' => 'real',
    'float:medium' => 'real',
    'float:big' => 'double precision',
    'float:normal' => 'real',
    'numeric:normal' => 'numeric',
    'blob:big' => 'bytea',
    'blob:normal' => 'bytea',
    'serial:tiny' => 'serial',
    'serial:small' => 'serial',
    'serial:medium' => 'serial',
    'serial:big' => 'bigserial',
    'serial:normal' => 'serial',
  );
  return $map;
}