Переглянути джерело

strip quotes when auto adding alias

Sven Klemm 7 роки тому
батько
коміт
bfac6303d0
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      public/app/plugins/datasource/postgres/query_ctrl.ts

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

@@ -385,7 +385,7 @@ export class PostgresQueryCtrl extends QueryCtrl {
 
     if (addAlias) {
       // set initial alias name to column name
-      partModel = sqlPart.create({ type: 'alias', params: [selectParts[0].params[0]] });
+      partModel = sqlPart.create({ type: 'alias', params: [selectParts[0].params[0].replace('"', '')] });
       if (selectParts[selectParts.length - 1].def.type === 'alias') {
         selectParts[selectParts.length - 1] = partModel;
       } else {