Search code examples
sqlpostgresqlcreate-tablesql-grant

what privilege is needed for a user to create table in another schema


I have a user rafal and I want to create a table in another schema. I do it like this:

grant usage on schema tony to rafal, 

but when I try to create a table, I still get errors:

create table tony.t1(a int);

ERROR:  permission denied for schema tony

and I also grant like this:

grant all on schema tony to rafal;

Is there any other privileges needed? I tried to search but can not find useful information.


Solution

  • The user would need the CREATE privilege.

    grant usage, create on schema tony to rafal;