Jelajahi Sumber

quote schema and table

Sven Klemm 7 tahun lalu
induk
melakukan
340f679d0f
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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 += "," + 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) => {
     var conditions = _.map(target.where, (tag, index) => {
       return this.renderTagCondition(tag, index, interpolate);
       return this.renderTagCondition(tag, index, interpolate);
     });
     });