I'm facing an issue when connecting my PostgreSQL database to ArcGIS Pro. I am using a user with superuser privileges, so I have full access to the database and its contents, including editing rights.
However, after I successfully add the database connection and drag layers into ArcGIS Pro, the layers appear as read-only views. I am unable to edit the features or create new ones using the "Create Features" tool.
I'm wondering why this happens.
Given that I have superuser privileges, shouldn't I be able to edit the layers directly?
-
1Welcome to GIS SE. As a new user, please take the Tour.Vince– Vince2025年04月15日 12:20:28 +00:00Commented Apr 15 at 12:20
1 Answer 1
Absolutely NOT.
First off, it's pretty much worst practice to get anywhere near a database as the superuser, especially in 3rd party clients like ArcGIS Pro (note the directionality -- ArcGIS is a client to the database, so you connect Pro to PostgreSQL, not the reverse). The only time you should connect as postgres
is at the initial Create Enterprise Geodatabase utility, or when using Create Database User for the actual minimal privilege users in the geodatabase.
Best practice is to create multiple users to maintain a geodatabase. The sde
user should only be used to manage the geodatabase (no user data owned by sde
). One or more "data owner" logins should be created, with a schema that exactly matches the lowercase-only logins with minimal database privileges. Then there should be access logins which, if connected to by ArcGIS tools, should also have a matching schema (for the creation of selection set logfiles). All users which create geodatabase data need USAGE on the sde
schema. Permissions for various modalities should be managed via group roles (e.g., "browse_role", "editor1_role", "editor2_role"...), to which individual users are granted membership.
Finally, your use of "views" is incorrect. A VIEW is a database object, which may or may not have edit rights to a TABLE. What is actually happening is that dragging a database table into Pro creates a Query Layer, which permits read-only access to a table without registration to the geodatabase. Only tables registered in the sde
schema metadata tables (via right-click Register or Register with Geodatabase, as the table owner), are permitted Pro edit access rights, and have versioning and other geodatabase behaviors available.
All connecting as superuser (or sde) provides is the ability to accidentally corrupt the geodatabase. I urge you to read the documentation on the way ArcGIS tools view databases, so you can get the best use of PostgreSQL with Esri tools.