function DatabaseSchema_pgsql::_createKeySql

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

File

includes/database/pgsql/schema.inc, line 404

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.