Post date: Nov 26, 2014 10:49:22 PM
The simplest way to create a spatial database in postgres is to use ESRI's Spatial Data Engine, or SDE. SDE is capable of sitting on top of postgres, and manages the geometry columns and spatial references of any spatial data tables in the database.
As I said, creating an SDE database is simple. To do so, follow these steps:
Ensure that PostgreSQL is installed.
In Arc, open the Data Management > Geodatabase Administration > Create Enterprise Geodatabase tool.
Choose PostgreSQL as the database platform.
For the instance, enter the server name (i.e. Atlas).
Database is the name of the database to be created (should be all lowercase).
Database Administrator should be left as the default, postgres.
The DB Admin Password is not optional if there is a password on the database.
Geodatabase Admin Password again is not optional if the sde user has a password, or if no sde user exists but should use a password once created.
Tablespace Name should generally be gis, so the database is not created in the pg_default tablespace.
Note: tablespaces define where the data is stored on disk, and can be used to optimize data access performance by putting highly-trafficked data on fast disks, and less important data on slow disks.
The Authorization file is something like "C:\Program Files (x86)\Esri\License10.2\sysgen\keycodes".
After running the Create Enterprise Geodatabase tool successfully, you will have a brand new SDE database in postgres. Next, you will need to add users; see my post on adding users to an SDE database in postgres for instructions and more information. Once user accounts are setup, you can create a database connection in Catalog to start adding, editing, and viewing data.