小编Har*_*mon的帖子

如何更改通过 Google Console 创建的数据库中公共架构的所有者?

在 Google 的 SQL Cloud Postgres 服务中,当我通过 Web 控制台为 PostgreSQL 实例创建数据库时,它会自动将数据库的默认“公共”架构的所有者设置为 cloudsqladmin。看来我无法更改所有权:

mydb=> \dn
    List of schemas
  Name  |     Owner
--------+---------------
 public | cloudsqladmin
(1 row)

mydb=> alter schema public owner to postgres;
ERROR:  must be owner of schema public


mydb=> \du
                                      List of roles
     Role name     |                   Attributes                   |      Member of
-------------------+------------------------------------------------+---------------------
 cloudsqladmin     | Superuser, Create role, Create DB, Replication | {}
 cloudsqlagent     | Create role, Create DB                         | {cloudsqlsuperuser}
 cloudsqlreplica   | Replication                                    | {}
 cloudsqlsuperuser | Create role, …
Run Code Online (Sandbox Code Playgroud)

postgresql google-cloud-sql google-cloud-platform

5
推荐指数
1
解决办法
1万
查看次数