Database Reference
In-Depth Information
GRANT USAGE ON SCHEMA postgis TO group1,
group2;
We generally do not want to grant the
CREATE
privilege in the
postgis
schema to any user or group. New objects (such as functions, views, and
tables) should not be added to the
postgis
schema.
10. Ifwewantallusersandgroupstohaveaccesstothe
postgis
schema,we
cangrantthe
USAGE
privilegetothe
public
metagroupbyexecutingthefol-
lowing command:
GRANT USAGE ON SCHEMA postgis TO public;
11. Beforecontinuingfurther,weshouldcheckthatourprivilegeshavebeenre-
flected in the database.
chapter10=# \dn+
List
of schemas
Name | Owner | Access
privileges | Description
--------------------+----------+----------------------+----------------------------------
postgis | postgres |
postgres=UC/postgres+|
| | group1=U/
postgres +|
| | group2=U/
postgres |
public | postgres |
postgres=UC/postgres+| standard public
schema
| | =UC/
postgres |
Grantingthe
USAGE
privilegetoaschemadoesnotallowthegrantedusers
andgroupstouseanyobjectsintheschema.The
USAGE
privilegeonlyper-