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:
Procedure
Connect Postgis Database to Qgis
![GIS0012-2018.07.11-Connect-Qgis-to-Postgis-Database-1](http://urbantalks.in/wp-content/uploads/2018/07/GIS0012-2018.07.11-Connect-Qgis-to-Postgis-Database-1-1024x549.png)
Add a connection
Add a Postgis database connection:
- In Browser pane open Postgis > New Connection.
- Fill in the configuration information as well as authentication information and then press Test Connection.
- 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](http://urbantalks.in/wp-content/uploads/2018/07/GIS0012-2018.07.11-Connect-Qgis-to-Postgis-Database-2-1024x549.png)
Add Data Layer to Qgis
Add Data Layer to Qgis :
- In Browser pane open Postgis > {connectionname} > {database} > {schema} > {table}.
- 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](http://urbantalks.in/wp-content/uploads/2018/07/GIS0012-2018.07.11-Connect-Qgis-to-Postgis-Database-3-1024x549.png)
edit data and push to postgis database
Edit the data and push it back to Postgis Database:
- In Layers pane open {layer} > Toggle Editing.
- Change the Geometry and Attribute Table Normally to edit features, again toggle editing when finished.
- 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](http://urbantalks.in/wp-content/uploads/2018/07/GIS0012-2018.07.11-Connect-Qgis-to-Postgis-Database-0-1024x549.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.