ArcGIS Server Banner

Setting up a direct connection to PostgreSQL

Setting up a direct connection to PostgreSQL

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback

About connecting directly to PostgreSQL

As mentioned in Properties of a direct connection to an ArcSDE geodatabase, no additional installation is needed on the client machine if you are going to make direct spatial database connections through ESRI products such as ArcGIS Desktop. However, the pg_hba.conf file does have to be altered to accept client connections. Consult the ArcSDE for PostgreSQL installation guide or the PostgreSQL documentation for information on altering the pg_hba.conf file.

The following steps are provided in case you need to create an OLEDB connection from ArcCatalog. Be sure the driver you install corresponds to the release of PostgreSQL to which you want to connect.

How to set up clients for an OLE DB connection

  1. Install the PostgreSQL ODBC driver, which can be obtained from the PostgreSQL Web site, http://www.postgresql.org/ftp/odbc/versions/.
  2. If the client machine is a UNIX or Linux machine, you also need to install the open source ODBC drivers for UNIX or Linux, which can be downloaded from http://www.unixodbc.org/ or http://www.iodbc.org/.

  3. Configure an ODBC connection on the client machine to connect to the desired PostgreSQL instance and database.
  4. 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.
  5. Test the ODBC connection.
  6. Add an OLE DB connection from ArcCatalog and test the connection. See the topic Adding OLE DB connections in the ArcCatalog section of the help for instructions on adding this type of connection to ArcCatalog.

Tip

  • If you receive a Bad login user error when trying to make an OLE DB or direct connection to the database, it means the pg_hba.conf file is not properly configured.

See Also

  • Setting up clients for a direct connection
  • Properties of a direct connection to an ArcSDE geodatabase