From ca88ae1905f4fc51c25f3dad9bf731d115a685f3 Mon Sep 17 00:00:00 2001
From: wolfox <gabriele.quaresima@enterprisedb.com>
Date: Wed, 18 Dec 2024 14:36:38 +0100
Subject: [PATCH] fix: apply Marco' suggestion

Signed-off-by: wolfox <gabriele.quaresima@enterprisedb.com>
---
 internal/management/controller/roles/postgres.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/internal/management/controller/roles/postgres.go b/internal/management/controller/roles/postgres.go
index 1aaa90f414..26c909d4b2 100644
--- a/internal/management/controller/roles/postgres.go
+++ b/internal/management/controller/roles/postgres.go
@@ -304,7 +304,7 @@ func appendInRoleOptions(role DatabaseRole, query *strings.Builder) {
 		quotedInRoles := make([]string, len(role.InRoles))
 
 		for i, inRole := range role.InRoles {
-			quotedInRoles[i] = pq.QuoteIdentifier(inRole)
+			quotedInRoles[i] = pgx.Identifier{inRole}.Sanitize()
 		}
 
 		query.WriteString(fmt.Sprintf(" IN ROLE %s ", strings.Join(quotedInRoles, ",")))