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 303544067..a048c9b08 100755 --- a/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh +++ b/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh @@ -341,7 +341,7 @@ begin else obj->>'role' end , case when obj->>'schema' is null then '' - else format('in schema %s', (obj->>'schema')::regnamespace) + else format('in schema %I', obj->>'schema') end , rec.privilege_type , case when obj->>'objtype' = 'r' then 'tables' @@ -369,7 +369,7 @@ begin execute(format('alter default privileges for role %I %s grant %s on %s to %s %s' , obj->>'role' , case when obj->>'schema' is null then '' - else format('in schema %s', (obj->>'schema')::regnamespace) + else format('in schema %I', obj->>'schema') end , rec.privilege_type , case when obj->>'objtype' = 'r' then 'tables'