1. The PGDIR environment variable must define the PostgreSQL software installation path.
  2. The PATH environment variable must define the access path to database client programs.
  3. On UNIX™, LD_LIBRARY_PATH (or equivalent) must hold the path to $PGDIR/lib.
  4. The PostgreSQL client library 'PGDIR/lib/libpq*' must be available.
  5. On the database server, the pg_hba.conf file must define security policies.
  6. Make sure the database client locale is properly defined (PGCLIENTENCODING)
  7. You can make a connection test with the PostgreSQL psql command line tool.