Privileges for geodatabases in PostgreSQL
Privileges determine what someone is authorized to do with the data and the database. Privileges should be assigned based on the type of work the person does in the organization. Is this person involved with administration of the geodatabase? Does this person need to edit or create data? Or would this person only need to query the data?
User privileges are set at different levels and for different purposes. The first section below describes the minimum required database and dataset privileges for common types of users: data viewers, data editors, data creators, and the geodatabase administrator. The second section lists privileges required by the geodatabase administrator to create and upgrade a geodatabase in PostgreSQL. The last section provides links to other information about possible required privileges.
Individual database users in PostgreSQL are referred to as login roles. To group together login roles based on the common tasks the users perform, you can create group roles, add the login roles to the group roles, and assign privileges to the group roles.
Note:
The CONNECT and TEMPORARY database privileges are granted to the public group role by default. If you revoke these privileges from the public group role, you need to explicitly grant CONNECT and TEMPORARY privileges on databases to specific logins or group roles.
You can use one of the administrative applications that connect to PostgreSQL databases, such as pgAdmin, to administer user privileges. Or you can use SQL statements to grant and revoke privileges.
Privileges on datasets in geodatabases must be granted or revoked using ArcGIS, and must be done by the dataset owner.
Privileges listed on this page apply to login roles in PostgreSQL and PostgreSQL database services that ArcGIS supports.
Minimum privileges
The following table lists privileges to be granted to each of three common groups—data viewers, data editors, and data creators—and the minimum privileges needed by the geodatabase administrator (the sde login role) for day-to-day operations.
|
Type of user |
Required privileges |
Purpose |
|---|---|---|
|
Data viewer |
Grant |
This privilege allows access to the geodatabase. |
|
Grant |
This privilege allows access to data in specific schemas. |
|
|
If the database uses the PostGIS geometry type for spatial data storage, roles require the |
This privilege is required to access PostGIS geometry data. |
|
|
If the database uses the PostGIS geography type for spatial data storage, roles require the |
This privilege is required to access PostGIS geography data. |
|
|
Grant |
The data owner must grant the |
|
|
Data editor Data editors require the same privileges as data viewers, as well as these additional privileges. |
When you use ArcGIS to grant the |
Data owners must grant editors the privileges required to edit data in a geodatabase. |
|
Data creator Data creators require the same privileges as data viewers plus this additional privilege. |
Each login role that creates data requires |
Granting |
|
Geodatabase administrator (the sde login role) |
The sde login role requires |
The geodatabase system tables, functions, and procedures are stored in the sde schema.
|
Privileges required to create or upgrade a geodatabase
The privileges required by the sde login to create and upgrade a geodatabase are described in the following table. The table lists privileges for each type of PostgreSQL implementation that ArcGIS supports.
|
Create geodatabase |
Upgrade geodatabase |
Notes |
|
|---|---|---|---|
|
PostgreSQL |
|
Have the ability to access all other users' schemas, and have the |
If you do not want the sde user to drop connections, you can revoke |
|
Amazon Relational Database Service (RDS) for PostgreSQL |
|
The sde user must also be granted all roles that own data in the geodatabase. For example, if roles gisdata1 and gisdata2 own data in the geodatabase, you must grant these roles to sde before upgrading.
Revoke the roles from sde after the geodatabase is upgraded. |
You can revoke |
|
Amazon Aurora (PostgreSQL-compatible edition) |
|
|
You can revoke |
|
Microsoft Azure Database for PostgreSQL |
|
|
You can revoke |
|
Google Cloud SQL for PostgreSQL |
The sde user must be granted |
The sde user must be granted |
You can revoke |
Other privileges
The following are additional privileges required to perform other, optional tasks in ArcGIS:
The sde user requires
superuserstatus in PostgreSQL to drop database connections using ArcGIS tools.Additional privileges may be required for ArcGIS Monitor to access and monitor the geodatabase. See Register PostgreSQL databases for more information.