Skip to main content

PostgreSQL Database

To connect to PostgreSql you need to start by installing the PostgreSql connector from the Simego GitHub page.

Installing

We have built a connector installer inside Data Sync that will download and install the relevant files from the Simego GitHub page.

We have a connector installer inside Data Sync that will download and install the relevant files for you to make this easier. To do this open the File menu and select Install Data Connector.

Install Connector

This will open the Connector Installer Window, where all you need to do is select the connector you want to install from the drop down and click OK. In this case we select PostgreSql from the dropdown.

Install PostgreSQL Connector

info

If you get an error saying it could not install the connector because it is "Unable to access folder", then this is because the folder is locked by Ouvvi. Please stop your Ouvvi services and try again.

If it was successful you should get a confirmation popup and you now need to close all instances of Data Sync and then re-start the program.

Connector Installed Successfully

You can then access the connector by expanding the SQL Database folder and selecting PostgreSql. The numbers contained in the brackets are the driver version the connector is targeting. If you are after targeting a newer driver please contact us via support@simego.com.

Location of PostgreSql Connector

Using the Connector

Once the connector is installed you can connect to your PostgreSql database by opening the connection window and going to SQL Database > PostgreSql.

You can then either enter in your connection string into the text box or you can build it out using the connection properties.

An example of the connection string you might use is:

DSN=myDSN;HOST=myServerAddress;DB=myDataBase;UID=myUsername;PWD=myPassword;PORT=2055;

For our connection we use the connection string:
Host=postgres1;Port=8432;Password=password;Username=user;Database=northwind;

PostgreSql Connection

For more ideas on generating your connection string we recommend visiting ConnectionStrings.com.

You can then click Connect & Create Library Connection to save this to the connection library so that you can use it again in other projects.

This will open a new window where you need to expand the tree to select a table to connect to, click OK to continue.

Postgres select table

Then enter in a name for your connection, an optional description and click OK to finish saving the connection.

Once it has been saved, you can refresh the connection library and under Databases you will now be able to see your PostgreSql database connection and expand it to select a table to connect to.

Postgres Connection

For more details on how to connect please take a look at the ADO.net connector page as this is what the connector is based upon.