Can't create feature class with PG_GEOMETRY keyword

4220
1
04-30-2015 05:28 AM
NickLebedev
New Contributor

I have enabled a PostgreSQL database as an enterprise geodatabase with ArcCatalog (using server license file etc).

When I create a new feature class with PG_GEOMETRY keyword, I get an error: ERROR: constraint "enforce_dims_shape" of relation "newclass" does not exist.

Newclass is the name of the feature class I'm trying to create. I guess for some reason ArcGIS can't create this constraint when creating a table in DB, or it just doesn't create it, and then looks for it.

I'm able to create tables and constraints with pgAdmin, connecting as an "sde" user and "postgres" user. ArcCatalog connection is set up to use "sde" user.

I have postgis extension installed in a DB, so I can create geometry type columns with pgAdmin.

I'm running PostgreSQL 9.3.5 + PostGIS 2.1.

When creating a feature class without PG_GEOMETRY keyword, it's being created with no problems as expected.

But I need postgis geometry type, so I can edit geometry data from ArcGIS and some other software. What should I do to create a new empty feature class with postgis geometry?

0 Kudos
1 Reply
ChristophSpoerri
New Contributor III

Hi Nick,

how did you create the database? Through the tool "Create Enterprise Database"? In case you want to use the pg_geometry (postgis) geometry, you need to create the database through the postgis template, i.e. psql -d [yourdatabase] -c "CREATE EXTENSION postgis;".

After you have created the database, you can proceed with the "Create Enterprise Database" tool.

Reader the following page for more info: PostgreSQL data types supported in ArcGIS—Help | ArcGIS for Desktop

Cheers, Chris