You are here

protected function DatabaseSchema_pgsql::_createKeySql in Drupal 7

1 call to DatabaseSchema_pgsql::_createKeySql()
DatabaseSchema_pgsql::_createIndexSql in includes/database/pgsql/schema.inc

File

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

Class

DatabaseSchema_pgsql

Code

protected function _createKeySql($fields) {
  $return = array();
  foreach ($fields as $field) {
    if (is_array($field)) {
      $return[] = 'substr(' . $field[0] . ', 1, ' . $field[1] . ')';
    }
    else {
      $return[] = '"' . $field . '"';
    }
  }
  return implode(', ', $return);
}