简体   繁体   中英

Can create extension but can't alter in PostgreSQL

The extension was created by user deploy with:

CREATE EXTENSION ltree;

now I need to move extension to another schema (still as a deploy user, schema utils is owned by deploy user too). So I do:

ALTER EXTENSION ltree SET SCHEMA utils;

which fails with:

ERROR: must be owner of extension ltree

So 2 questions:

  1. Why does PG allow creating the extension for deploy user but not altering it by the same user?
  2. How can I change the schema of the extension still being the deploy user?

Thanks.

The extension has to be relocatable to move to another schema.

The easiest solution is probably to just drop the extension from your schema, then create it in a new schema.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM