strip quotes when auto adding alias

This commit is contained in:
Sven Klemm 2018-08-29 12:14:17 +02:00
parent ab4fbff454
commit bfac6303d0

View File

@ -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 {