Skip to content

Commit 748cb91

Browse files
soedirgodarora
authored andcommitted
fix: schema name escaping
1 parent 2aeac8b commit 748cb91

File tree

1 file changed

+2
-2
lines changed
  • ansible/files/admin_api_scripts/pg_upgrade_scripts

1 file changed

+2
-2
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ begin
341341
else obj->>'role'
342342
end
343343
, case when obj->>'schema' is null then ''
344-
else format('in schema %s', (obj->>'schema')::regnamespace)
344+
else format('in schema %I', obj->>'schema')
345345
end
346346
, rec.privilege_type
347347
, case when obj->>'objtype' = 'r' then 'tables'
@@ -369,7 +369,7 @@ begin
369369
execute(format('alter default privileges for role %I %s grant %s on %s to %s %s'
370370
, obj->>'role'
371371
, case when obj->>'schema' is null then ''
372-
else format('in schema %s', (obj->>'schema')::regnamespace)
372+
else format('in schema %I', obj->>'schema')
373373
end
374374
, rec.privilege_type
375375
, case when obj->>'objtype' = 'r' then 'tables'

0 commit comments

Comments
 (0)