Summary – Connect Qgis to Postgis Database and Edit Data Layers.

Instructions provided describe how to Connect Qgis to Postgis Database and Edit Data Layers.

Two Steps:

  1. Connect Postgis Database to Qgis.
  2. Push back the edited data layer to Database.

Procedure

Connect Postgis Database to Qgis

GIS0012-2018.07.11-Connect-Qgis-to-Postgis-Database-1

Add a connection

Add a Postgis database connection:
  1. In Browser pane open Postgis > New Connection.
  2. Fill in the configuration information as well as authentication information and then press Test Connection.
  3. On a blue message reading “connection successful” click OK.

Note : If you are Trying to connect to a remote database please do check the pg_hba.conf to ensure your system has entry to the database.

GIS0012-2018.07.11-Connect-Qgis-to-Postgis-Database-2

Add Data Layer to Qgis

Add Data Layer to Qgis :
  1. In Browser pane open Postgis > {connectionname} > {database} > {schema} > {table}.
  2. Drag and Drop the Layers to Screen.

Push back the edited data layer to Database

GIS0012-2018.07.11-Connect-Qgis-to-Postgis-Database-3.png

edit data and push to postgis database

Edit the data and push it back to Postgis Database:
  1. In Layers pane open {layer} > Toggle Editing.
  2. Change the Geometry and Attribute Table Normally to edit features, again toggle editing when finished.
  3. Click on Layers pane | {layer} > Update SQL Layer to push changes back to the database.

Tadda done!!

GIS0012-2018.07.11-Connect-Qgis-to-Postgis-Database-3.png

GIS0012-2018.07.11-Connect-Qgis-to-Postgis-Database-3.png

if you like the tutorial please spread the word and comment below if you have any questions.