try and avoid naming conflicts so put _idx on the end of all postgres indexes

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@667 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
David Goodwin 16 years ago
parent 78c2f03df0
commit dadb8094da

@ -229,7 +229,7 @@ function _add_index($table, $indexname, $fieldlist) {
if ($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli' ) {
return "ALTER TABLE $table ADD INDEX `$indexname` ( `$fieldlist` )";
} elseif($CONF['database_type'] == 'pgsql') {
$pgindexname = $table . "_" . $indexname;
$pgindexname = $table . "_" . $indexname . '_idx';
return "CREATE INDEX $pgindexname ON $table($fieldlist);"; # Index names are unique with a DB for PostgreSQL
} else {
echo "Sorry, unsupported database type " . $conf['database_type'];

Loading…
Cancel
Save