Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grant "create schema" ON database to a user?

I'm using PostgreSQL 9.1 and have to to grant "create schema" ON database to a user.

How can I do that?

like image 807
matheusvmbruno Avatar asked Jun 01 '12 14:06

matheusvmbruno


People also ask

How do I grant privileges to schema?

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.

How do I grant a build schema permission in postgresql?

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.

Can Db_ddladmin create 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.


1 Answers

It's more simple than I thought.

GRANT CREATE ON DATABASE db TO user; 
like image 180
matheusvmbruno Avatar answered Sep 22 '22 09:09

matheusvmbruno