Select to view content in your preferred language

Accessing PostgreSQL public schema tables from ArcCatalog / Python scripts

4992
3
12-21-2011 11:22 AM
StephenHodge
New Contributor
I have an html and django based application that has an extensive user interface that allows users and administrators to capture things like usernames, projectids, organizations, treatment types, etc that are used as look up tables for the GIS layers.  All of these tables are stored in the public schema. The user application interfaces the public schema tables as picklist for the features that get entered.  All of the GIS stuff is in the SDE schema.  We use SQL insert commands to insert data into the point and polygon features classes.  All of this is working fine. Using ArcMap I can see and draw the layers correctly.  Using PGAdmin, I can see and access the public schema files just fine.

The problem is I need to be able to use ArcMap and Catalog to look at the data together.  This will require me to join the public schema tables to the SDE feature class layers so I can see the true values for the fields rather than the codes that are actually stored in the feature classes.  I can't seem to figure out how to access the public schema tables through ArcCatalog.  I can see them just fine, but can not access them.  If I try to get the properties of one of the public schema tables it says: "Failed to edit selected object(s). DBMS table not found"

I have tried changing the owner of those table to sde through PGAdmin, but that does help.

I know if I had to do this over, I would have written the GIS stuff to the public schema, but its too late for that now, or at least that's what I am thinking now.

Any ideas?
0 Kudos
3 Replies
ShengyaoDuan
Esri Contributor
This is a known limitation for ArcGIS 10.0 or earlier release (user name and the schema name have to be the same). For now, you may want to move the data under public schema to a named schema(again, the schema name and the user name need to be the same).

Access data under public schema is possible in ArcGIS10.1 via the new capability of �??directly access spatial database tables�?�.
0 Kudos
NathanJennings
New Contributor III
I have also run into this problem.  I did create a different user and schema other than "public" and created a new table (called Rain_Gauges).  the screen shot is below.  I can connect with my new user "Nate" and see the table list in ArcCatalog, but I cannot see the field headings or any data in ArcCatalog. 
Any additional feedback would be great.

I am using ArcGIS 10 SP2 using an ArcInfo License, PostGreSQL 9.1.3, PostGIS 1.5 for PostgeSQL 9.1.

I am trying to work this out because I have some users with a Postgres database that would like to connect to Postgres via ArcView 10.  I think they are using an older version of Postgres (like 3.x), but could have them upgrade to a more current version.

Thank you.  I hope to see some feedback with some details to walk through this.

Nate
0 Kudos
ChadMitchell
New Contributor
Nate,

I would say there is something amiss with your database structure. I did replicate your issue creating the database in postgres then connecting using the OLD DB connection setting a build script as the method.
I also found that if you add via the shp to dbf tool from postgres it allows the table propogation. Didnt see any issue with the setting public though.

Have spoken to ESRI Australia before the use of editing in the SQL server can cause lots of issues they only suggest working through Arcgis/catalog.

Used Postgres 9.2.1-1 64 Postgis 2.0.0.1 and psqlobdc connectors (may not have installed these properly).
0 Kudos