I'm using PostgreSQL 9.1 and have to to grant "create schema" ON database to a user.
How can I do that?
Only an authorization ID with ACCESSCTRL or SECADM can grant the following privileges on schema names starting with SYS: SELECTIN privilege on SYSCAT, SYSFUN, SYSSTAT or any schema names starting with SYSIBM (SQLSTATE 42501). SELECTIN, CREATEIN and DROPIN privileges on SYSPROC, SYSPUBLIC or SYSTOOLS schemas.
If you want to provide privileges on only a single schema, you will mention the schema's name in the command. >> GRANT USAGE ON SCHEMA public TO Postgres; Now the user can access that particular schema.
db_ddladmin: Members of the db_ddladmin fixed database role can run any Data Definition Language (DDL) command in a database. As you can see, these permissions will give you privileges to create and manipulate some database structure. However, they will not give you the privileges to alter other user or create schema.
It's more simple than I thought.
GRANT CREATE ON DATABASE db TO user;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With