function db_add_index

7.x database.inc db_add_index($table, $name, $fields)
6.x database.pgsql.inc db_add_index(&$ret, $table, $name, $fields)
6.x database.mysql-common.inc db_add_index(&$ret, $table, $name, $fields)

Add an index.

Parameters

$ret: Array to which query results will be added.

$table: The table to be altered.

$name: The name of the index.

$fields: An array of field names.

Related topics

20 calls to db_add_index()
comment_update_6003 in drupal-6.x/modules/comment/comment.install
Add index to parent ID field.
comment_update_6004 in drupal-6.x/modules/comment/comment.install
Add index to to node_comment_statistics on comment_count
comment_update_6005 in drupal-6.x/modules/comment/comment.install
Add indices to uid fields.
locale_update_6004 in drupal-6.x/modules/locale/locale.install
Fix remaining inconsistent indexes.
system_update_1022 in drupal-6.x/modules/system/system.install
Add index on users created column.

... See full list

File

drupal-6.x/includes/database.pgsql.inc, line 813
Database interface code for PostgreSQL database servers.

Code

function db_add_index(&$ret, $table, $name, $fields) {
  $ret[] = update_sql(_db_create_index_sql($table, $name, $fields));
}