PostGIS: Add Database Connection

To define a new connection from the Connection parameter in a PostGIS format:

  • Select Add Database Connection. See database-specific parameters below, as well as the section Adding a Database Connection in a Workspace in Using Database Connections The new connection can be made visible only to the current user, or can be shared among multiple users.

Note: To select an existing, previously defined connection, see the section Reusing a Database Connection in Using Database Connections

Database Connection

PostgreSQL (PostGIS is a geometric layer over a PostgreSQL ORDBMS.)

Name

Enter a name for the new connection. Entering a descriptive name allows you to easily find the connection in future workspaces.

The following characters are not allowed in connection names: ^ \ / : * ? " < > | & = ' + % #

Connection Parameters

Note: The source and destination dataset must be set to the database name.

Host

This specifies the machine running the PostGIS/PostgreSQL ORDBMS as either an IP address or host name. The database must have proper permissions and be set up to accept TCP/IP connections if connecting from a remote machine.

Port

When connecting remotely, this specifies the TCP/IP port on which to connect to the ORDBMS service. The default port is 5432.

Database

This specifies the name of the PostGIS-enabled PostgreSQL database. The database must exist in the ORDBMS.

Username and Password

Enter the username and password to access the service.

Note: If you are having trouble connecting to the database, ensure you can connect to the database with the host, port, database, username, and password using psql. See PostgreSQL documentation for proper security and connection information, and for the usage of the psql utility.

SSL Options

SSL Mode

This parameter specifies the priority to be used for a secure SSL TCP/IP connection with the server. There are six modes:

  • Disable: Try only a non-SSL connection.
  • Allow: First try a non-SSL connection; if that fails, try an SSL connection.
  • Prefer: (default) First try an SSL connection; if that fails, try a non-SSL connection.
  • Require: Try only an SSL connection. If a root CA file is present, verify the certificate in the same way as if the Verify-CA option was selected.
  • Verify-CA: Try only an SSL connection, and verify that the server certificate is issued by a trusted certificate authority (CA).
  • Verify-Full: Try only an SSL connection, and verify that the server certificate is issued by a trusted CA and that the requested server host name matches that in the certificate.

CA Certificate

Optional path to SSL certificate authority (CA) file. If the file exists, the server's certificate will be verified to be signed by one of these authorities. This is only required if the user wishes to point to a CA Certificate file other than the default at ~/.postgresql/root.crt.

Client Certificate

Optional path to client SSL certificate file. This parameter is ignored if an SSL connection is not made. This is only required if the user wishes to point to a client certificate file other than the default at ~/.postgresql/postgresql.crt.

Client Private Key

Optional path to the client secret key file. This parameter is ignored if an SSL connection is not made. This is only required if the user wishes to point to a client key file other than the default at ~/.postgresql/postgresql.key.

SSL Password

Optional password for the secret key specified in Client Private Key, allowing client certificate private keys to be stored in encrypted form on disk. If the key is not encrypted, this parameter is ignored.