From 21f45d4927e2afa8444d8e3753f3924cd66650aa Mon Sep 17 00:00:00 2001 From: Oscar Kilhed Date: Wed, 18 Aug 2021 16:17:30 +0200 Subject: [PATCH] Postgres UUID group issue (#37999) * Add UUID to types that can be grouped by * Remove noop switch --- public/app/plugins/datasource/postgres/meta_query.ts | 2 +- public/app/plugins/datasource/postgres/query_ctrl.ts | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/public/app/plugins/datasource/postgres/meta_query.ts b/public/app/plugins/datasource/postgres/meta_query.ts index c30ab26fa2e..5ba0154ec01 100644 --- a/public/app/plugins/datasource/postgres/meta_query.ts +++ b/public/app/plugins/datasource/postgres/meta_query.ts @@ -132,7 +132,7 @@ table_schema IN ( break; } case 'group': { - query += " AND data_type IN ('text','character','character varying')"; + query += " AND data_type IN ('text','character','character varying','uuid')"; break; } } diff --git a/public/app/plugins/datasource/postgres/query_ctrl.ts b/public/app/plugins/datasource/postgres/query_ctrl.ts index 4327b3ae8db..44d3705b38d 100644 --- a/public/app/plugins/datasource/postgres/query_ctrl.ts +++ b/public/app/plugins/datasource/postgres/query_ctrl.ts @@ -661,12 +661,7 @@ export class PostgresQueryCtrl extends QueryCtrl { } addGroupAction() { - switch (this.groupAdd.value) { - default: { - this.addGroup(this.groupAdd.type, this.groupAdd.value); - } - } - + this.addGroup(this.groupAdd.type, this.groupAdd.value); this.resetPlusButton(this.groupAdd); this.updateRawSqlAndRefresh(); }