_db_process_field

6 database.pgsql.inc _db_process_field($field)
6 database.mysql-common.inc _db_process_field($field)

Set database-engine specific properties for a field.

Parameters

$field: A field description array, as specified in the schema documentation.

Related topics

5 functions call _db_process_field()

File

drupal/includes/database.pgsql.inc, line 563
Database interface code for PostgreSQL database servers.

Code

<?php
function _db_process_field($field) {
  if (!isset($field['size'])) {
    $field['size'] = 'normal';
  }
  // Set the correct database-engine specific datatype.
  if (!isset($field['pgsql_type'])) {
    $map = db_type_map();
    $field['pgsql_type'] = $map[$field['type'] . ':' . $field['size']];
  }
  if ($field['type'] == 'serial') {
    unset($field['not null']);
  }
  return $field;
}
?>