From b5110ba995e1a71f68eeb1be82f776d4782ce551 Mon Sep 17 00:00:00 2001 From: Paul Cioanca Date: Thu, 12 Sep 2024 19:15:36 +0300 Subject: [PATCH] fix(pg_upgrade): add quotes around role options --- ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh b/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh index 8b0ee61d2..db75be80a 100755 --- a/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh +++ b/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh @@ -254,7 +254,7 @@ begin select split_part(value, '=', 1) as key, substr(value, strpos(value, '=') + 1) as value from jsonb_array_elements_text(obj->'configs') loop - execute(format('alter role %I %s set %I to %s', + execute(format('alter role %I %s set %I to "%s"', obj->>'role', case when obj->>'database' is null then '' else format('in database %I', obj->>'database') end, rec.key,