I have a user dbadmin, which has the highest permissions possible in AWS RDS.

Using dbadmin I created a database, foo, owned by fooadmin.

As fooadmin, I can CREATE SCHEMA in that database. As dbadmin, I cannot, I get this error:

create schema ff;
ERROR:  permission denied for database foo

My dbadmin user certainly has access to this database:

grant create on database foo to dbadmin;
WARNING:  no privileges were granted for "foo"

This is sort of the inverse of this question, which was asking how to elevate privileges for fooadmin.

update 1 for EvanC:

select user;
(1 row)

sdm=> create schema ff;
ERROR:  permission denied for database foo

update 2 workaround:

Inspired by this question, if I change the database owner to the dbadmin account, I can at least create schemas as that user. Obviously it means fooadmin can't create schemas anymore. I suppose I could change the owner, create schemas, then change the owner back.

  • In my hands, 'WARNING: no privileges were granted for "foo"' doesn't mean that dbadmin already had those privileges, but rather it means that whoever ran the command doesn't have the privilege to grant the privilege.
    – jjanes
    Sep 21, 2017 at 15:43
  • @EvanCarroll added that.
    – tedder42
    Sep 21, 2017 at 20:07


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.