Setting up a direct connection to PostgreSQL
No additional configuration is necessary to make a direct connection to a geodatabase in PostgreSQL if you are connecting from ArcGIS Desktop, ArcGIS Engine, or ArcGIS Server. However, if you want to create a custom client using the ArcSDE C or Java API, from which you want to make a direct connection to a geodatabase in PostgreSQL, you must install the PostgreSQL client files on the client computer.
Steps:
- 
Install or copy  the PostgreSQL client files to the bin directory of your custom application.
- If your custom application is installed on a Red Hat Linux server, you can run the library RPM provided on the ArcSDE installation media to install the PostgreSQL libraries—postgresql-lilbs-8.3.8-1PGDG.rhel15.rpm—to install the libraries into the bin directory of your custom application.
 - If your custom application is installed on Windows, you can copy the following libraries from the PostgreSQL lib directory and paste them in your applications bin directory.
- comerr32.dll
 - gssapi32.dll
 - k5sprt32.dll
 - krb5_32.dll
 - libeay32.dll
 - libiconv2.dll
 - libintl3.dll
 - libpq.dll
 - ssleay32.dll
 
 
 - Alter the PostgreSQL pg_hba.conf file on the database server to accept client connections. See Configuring a PostgreSQL database cluster on Linux to accept client connections, Configuring a PostgreSQL database cluster on Windows to accept client connections, or the PostgreSQL documentation for information on altering the pg_hba.conf file.
 - By default, Public has CONNECT permissions to the PostgreSQL instance; therefore, you only need to grant CONNECT to individual users if you revoked the CONNECT privilege from Public.
 
Related Topics
11/18/2013