我有一个 Postgres 数据库和我在 Google Cloud SQL 上创建的用户.
我正在尝试为该用户安装 postgis 扩展:
myuser=>创建扩展postgis;错误:创建扩展postgis"的权限被拒绝提示:必须是超级用户才能创建此扩展.如你所见,它不允许我为这个用户创建扩展,所以我试图让这个用户成为 postgres 角色的超级用户:
postgres=>使用超级用户更改用户 myuser;错误:必须是超级用户才能更改超级用户我收到以下错误.这是因为 Google Cloud SQL 不允许任何 postgres 帐户的 SUPERUSER 角色根据:
I've got a Postgres database and user I've created on Google Cloud SQL.
I'm trying to install the postgis extension for that user:
myuser=> CREATE EXTENSION postgis; ERROR: permission denied to create extension "postgis" HINT: Must be superuser to create this extension.as you can see, it won't allow me to create the extension for this user, so I attempted to make this user a superuser from the postgres role:
postgres=> ALTER USER myuser WITH SUPERUSER; ERROR: must be superuser to alter superusersand I get the following error. This is because Google Cloud SQL does not allow the SUPERUSER role for any postgres accounts according to: cloud.google/sql/docs/postgres/users.
So I'm in this weird state of purgatory that I need to add this extension, but can't.
Any tips on how to proceed?
解决方案It looks like creating a new user through the API (or the console) will give it the proper permissions, at least according to the prompt when trying to add additional users through the console:
更多推荐
无法在 Google Cloud SQL 上创建 postgis 扩展
发布评论