We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 405c7b4 + 6009497 commit c7e4da9Copy full SHA for c7e4da9
pkg/services/provision/databases/postgres/postgres_mgmt.go
@@ -114,6 +114,17 @@ declare
114
begin
115
new_owner := @usernameStr;
116
117
+ -- allow working with all schemas
118
+ for r in select * from pg_namespace loop
119
+ raise debug 'Changing ownership of schema % to %',
120
+ r.nspname, new_owner;
121
+ execute format(
122
+ 'alter schema %I owner to %I;',
123
+ r.nspname,
124
+ new_owner
125
+ );
126
+ end loop;
127
+
128
-- c: composite type
129
-- p: partitioned table
130
-- i: index
@@ -210,7 +221,6 @@ begin
210
221
end loop;
211
222
212
223
grant select on pg_stat_activity to @username;
213
-
214
224
end
215
225
$$;
216
226
`
0 commit comments