PostgreSQL: Export DESC indexes (bug #639)

This commit is contained in:
Jakub Vrana 2018-10-27 18:14:00 +02:00
parent c8975a151c
commit 7f2dd73670
2 changed files with 6 additions and 1 deletions

View file

@ -758,7 +758,11 @@ AND typelem = 0"
// "basic" indexes after table definition
foreach ($indexes as $index_name => $index) {
if ($index['type'] == 'INDEX') {
$return .= "\n\nCREATE INDEX " . idf_escape($index_name) . " ON " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " USING btree (" . implode(', ', array_map('idf_escape', $index['columns'])) . ");";
$columns = array();
foreach ($index['columns'] as $key => $val) {
$columns[] = idf_escape($val) . ($index['descs'][$key] ? " DESC" : "");
}
$return .= "\n\nCREATE INDEX " . idf_escape($index_name) . " ON " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " USING btree (" . implode(', ', $columns) . ");";
}
}

View file

@ -10,6 +10,7 @@ Make maxlength in all fields a soft limit
MySQL: Support foreign keys created with ANSI quotes (bug #620)
MySQL: Recognize ON UPDATE current_timestamp() (bug #632, bug #638)
PostgreSQL: Quote array values in export (bug #621)
PostgreSQL: Export DESC indexes (bug #639)
MSSQL: Pass database when connecting
ClickHouse: Connect, databases list, tables list, select, SQL command
Georgian translation