Setting up a connection to PostgreSQL
PostgreSQL client libraries are required on the client computer from which you will connect to the database.
You can download the PostgreSQL client files from the Esri Customer Care portal and place them in the bin directory of your ArcGIS client application to allow you to connect directly to a PostgreSQL database.
There are four possible client library downloads:
- pg_client_linux86: Includes the RPM client files required to make a connection from a 32-bit client running on a Red Hat Linux operating system to a PostgreSQL database.
- pg_client_windows86: Includes the client files required to make a connection from a 32-bit client on a Windows operating system to a PostgreSQL database. Files are libeay32.dll, libiconv-2.dll, libintl-8.dll, libpq.dll, and ssleay32.dll.
- pg_client_linux64: Includes the RPM client files required to make a connection from a 64-bit client running on a Red Hat Linux operating system to a PostgreSQL database. Libraries are libpq.so, libpq.so.5, and libpq.so.5.3.
- pg_client_windows64: Includes the client files required to make a connection from a 64-bit client running on a Windows operating system to a PostgreSQL database. The files are libeay32.dll, libintl.dll, libpq.dll, and ssleay32.dll.
To use a client on SUSE Linux, you need to install the PostgreSQL SUSE client. If your PostgreSQL database is installed on SUSE, you can copy or use FTP to move the client libraries from your PostgreSQL lib directory to your ArcGIS client bin directory. If your PostgreSQL database is installed on a different operating system, obtain the SUSE PostgreSQL client files from PGFoundry or a similar site.
To use the client libraries available on the Esri Customer Care portal, do the following:
-
Download the PostgreSQL client libraries from the Esri Customer Care portal.
Be sure to download the correct libraries for your ArcGIS client. For 32-bit ArcGIS applications, you need the 32-bit libraries. For 64-bit ArcGIS applications, you need the 64-bit client libraries.
- Be sure your ArcGIS client application is closed.
- Transfer the client files to the bin directory of your ArcGIS client installation.Note:
Be sure to place all the files in the bin directory. Specific versions of these files are required to connect to the database; even if you already have a different version of one of the files on your system, you still need the version of the file that you downloaded from the Esri Customer Care portal to be present in the ArcGIS client bin directory.
- If you placed the client RPMs on a Linux server, run the RPMs.
- Alter the PostgreSQL pg_hba.conf file on the database server to accept client connections. See the PostgreSQL documentation for information on altering the pg_hba.conf file.
- Restart PostgreSQL or force the postmaster to reload the pg_hba.conf file by running pg_ctl reload.
-
Be sure users have privileges to connect to the database cluster.
By default, Public has CONNECT privileges to the PostgreSQL database cluster; therefore, you only need to grant CONNECT to individual login or group roles if you revoked the CONNECT privilege from Public.