From 6d07d825e9cf7f8c1d7807fbdaa2c04d25502b42 Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Fri, 3 Aug 2018 18:38:40 +0200 Subject: [PATCH] dont break default parameters for functions --- public/app/plugins/datasource/postgres/query_ctrl.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/app/plugins/datasource/postgres/query_ctrl.ts b/public/app/plugins/datasource/postgres/query_ctrl.ts index 6138896d42a..a196859b802 100644 --- a/public/app/plugins/datasource/postgres/query_ctrl.ts +++ b/public/app/plugins/datasource/postgres/query_ctrl.ts @@ -275,7 +275,7 @@ export class PostgresQueryCtrl extends QueryCtrl { } let partModel = sqlPart.create({ type: partType }); if (subItem) { - partModel.params = [subItem.value]; + partModel.params[0] = subItem.value; } let addAlias = false; @@ -287,7 +287,6 @@ export class PostgresQueryCtrl extends QueryCtrl { this.selectParts.push(parts); break; case 'percentile': - partModel.params.push('0.95'); case 'aggregate': // add group by if no group by yet if (this.target.group.length === 0) { @@ -305,7 +304,6 @@ export class PostgresQueryCtrl extends QueryCtrl { } break; case 'moving_window': - partModel.params.push('5'); case 'window': let windowIndex = this.findWindowIndex(selectParts); if (windowIndex !== -1) {