Quellcode durchsuchen

quote schema and table

Sven Klemm vor 7 Jahren
Ursprung
Commit
340f679d0f
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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);
     });