瀏覽代碼

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) {
     if (addAlias) {
       // set initial alias name to column name
       // 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') {
       if (selectParts[selectParts.length - 1].def.type === 'alias') {
         selectParts[selectParts.length - 1] = partModel;
         selectParts[selectParts.length - 1] = partModel;
       } else {
       } else {