quote column name in buildValueQuery

pull/11081/head
Sven Klemm 8 years ago
parent 731c7520b3
commit b12d049f6f
  1. 2
      public/app/plugins/datasource/postgres/query_builder.ts

@ -39,7 +39,7 @@ export class PostgresQueryBuilder {
}
buildValueQuery(column: string) {
var query = "SELECT DISTINCT quote_literal(" + column + ")";
var query = "SELECT DISTINCT quote_literal(" + this.queryModel.quoteIdentifier(column) + ")";
query += " FROM " + this.queryModel.quoteIdentifier(this.target.schema);
query += "." + this.queryModel.quoteIdentifier(this.target.table);
query += " ORDER BY 1 LIMIT 100";

Loading…
Cancel
Save