0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

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
This commit is contained in:
David Goodwin 2009-05-28 19:47:52 +00:00
parent 78c2f03df0
commit dadb8094da

View File

@ -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'];