Explorar o código

quote schema and table

Sven Klemm %!s(int64=7) %!d(string=hai) anos
pai
achega
340f679d0f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      public/app/plugins/datasource/postgres/postgres_query.ts

+ 1 - 1
public/app/plugins/datasource/postgres/postgres_query.ts

@@ -221,7 +221,7 @@ export default class PostgresQuery {
       query += "," + this.quoteIdentifier(this.target.metricColumn) + " AS metric";
     }
 
-    query += ' FROM ' + target.schema + '.' + target.table + ' WHERE ';
+    query += ' FROM ' + this.quoteIdentifier(target.schema) + '.' + this.quoteIdentifier(target.table) + ' WHERE ';
     var conditions = _.map(target.where, (tag, index) => {
       return this.renderTagCondition(tag, index, interpolate);
     });