Connecting PostgreSQL database via network.

Question:

Can I connect to a PostGreSQL database via network? How should I set this up?

Solution:

Yes, you can. To do so, you must follow these guidelines:

Server:

  • Install PostGreSQL database. To download its installer, click here.
  • Add an exception to Windows’ Firewall (to unblock port 5432).
  • Edit file pg_hba.conf. Example of file location: C:\Program Files\PostgreSQL\8.4\data. Change the line so it will read like this:
# IPv4 local connections:
host all  all 0.0.0.0/0 md5
  • Edit file postgresql.conf, removing the initial comment from the line below so it will look like this:
    listen_addresses = '*' # what IP address(es) to listen on;

Client:

From Elipse E3 version 6.5 on, the supervisory has featured native support to PostgreSQL databases, in addition to Access, SQLServer, MySQL and Oracle databases.
For previous versions of Elipse E3, you can use the procedure described below.

  • Install PostgreSQL ODBC Driver. To download this driver, click here.

 

 

         The driver above is only compatible with 32-bit architecture.

  • Create ODBC connection. (In Server field, input the name of the ODBC server).
  • Use either the PostgreSQL library developed in E3 or scripts for the connection.
Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *