add order by to metadata queries

pull/11081/head
Sven Klemm 7 years ago
parent 7af9cd7dfc
commit e1a37cf275
  1. 5
      public/app/plugins/datasource/postgres/meta_query.ts

@ -55,7 +55,7 @@ LIMIT 1
buildSchemaQuery() {
let query = 'SELECT quote_ident(schema_name) FROM information_schema.schemata WHERE';
query += " schema_name NOT LIKE 'pg_%' AND schema_name NOT LIKE '\\_%' AND schema_name <> 'information_schema';";
query += " schema_name !~* '^pg_|^_|information_schema' ORDER BY schema_name";
return query;
}
@ -63,6 +63,7 @@ LIMIT 1
buildTableQuery() {
let query = 'SELECT quote_ident(table_name) FROM information_schema.tables WHERE ';
query += 'table_schema = ' + this.quoteIdentAsLiteral(this.target.schema);
query += ' ORDER BY table_name';
return query;
}
@ -92,6 +93,8 @@ LIMIT 1
}
}
query += ' ORDER BY column_name';
return query;
}

Loading…
Cancel
Save