When I connect to my PostgreSQL (PostGIS) database then everything seems fine until I basically add data to the map in ArcGIS Pro 3.3.
While at a first glance it seems all good, the diagnostic monitor shows the following:
Database: ip-address -> SQL: SELECT * FROM db_name.schema.table -> Number of rows returned: 0
That is strange since when I visualize the features in the Query Feature Class then it shows all the features (103.609). But when I open the attribute table then I am getting a warning: Table -> Failed to open table., yet in the background the attribute table loads and is populated.
In the same context I have also seen an error message:
Cancelling statement due to user request::SQL STATE=57014
The moment I add a definition query to the class it is getting pretty interesting when I try to see attribute data...
Interesting is, that when I create the definition query then I can select from the correct values in the value field of the WHERE statement, and the diagnostics monitor returns the correct count of rows from the DISTINCT statement against that column.
But when I apply the definition query then the statement issued against the database is the following:
SQL: SELECT ESRI_OID FROM db_name.schema.table WHERE column_name = selected_value ORDER BY ESRI_OID LIMIT 1
The number of rows returned is 1
There should be thousands...
Then I confirm the properties dialog of the Query Feature Class, and the diagnostics monitor shows a new SQL statement issued:
SQL: SELECT * FROM db_name.schema.table -> Number of rows returned: 0
Looking at help pages I get the advice the check the accessibility of the data, especially if the data is on a shared drive or database server.
Anybody here who had the same problem, found a solution and solved it? @George_Thompson or @AyanPalit maybe?
I have not seen this one before regarding the table not showing up. What is your version of PostgreSQL / PostGIS that you are using?
@TomGeo The symptoms stated leads me to think 'SDE' user/schema (geodatabase admin account) is not setup correctly or does not have correct privileges applied to the user schema objects. The relevant documentation to review: https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/manage-postgresql/overview-geodataba...