1

Уважаемые знатоки postgresql!

После вот такой команды:

db=> CREATE EXTENSION IF NOT EXISTS ext WITH SCHEMA test;
ERROR:  permission denied to create extension "ext"
HINT:  Must be superuser to create this extension.

Вопрос: как создать суперпользователя из уже существующего пользователя?

1
  • 2
    А точно нужны права суперпользователя? документация рекомендует иное: Tip: It is good practice to create a role that has the CREATEDB and CREATEROLE privileges, but is not a superuser, and then use this role for all routine management of databases and roles. This approach avoids the dangers of operating as a superuser for tasks that do not really require it.
    – Akina
    7 дек 2016 в 13:42

1 ответ 1

3

Необходимо выполнить следующее:

ALTER USER user WITH SUPERUSER;

Вместо user имя вашего пользователя соответственно.

1
  • 3
    тут еще нужно добавить, что делать это нужно из-под суперпользователя, типа postgres
    – Woleks
    8 дек 2016 в 7:29

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.