In the previous article, we learned how to install PostGIS on Debian 13. Now, we are going to try to use the PostGIS to store spatial datasets. We will use QGIS to export the spatial datasets (Shapefiles) to the PostGIS. QGIS has excellent interoperability with the PostGIS. We can directly edit the PostGIS spatial tables in QGIS.
Steps to Export Spatial Dataset to PostGIS
Before you can export spatial data to PostGIS, make sure you have access to the PostgreSQL Server and PostGIS extension. Please read my previous article to install PostGIS on Debian 13.
Step 1. Create PostGIS Connection in QGIS
Right-click PostgreSQL from the left browser in QGIS and choose New Connection. A PostgreSQL new connection window will be showing up.

Fill in the required information including:
- Name: Give a distinct name for the connection
- Host: The PostgreSQL host or IP address
- Port: 5432. Change it if your server has different port
- Database: Your database name
- Username and Password
Test the connection and make sure it can connect successfully. Press OK to complete this step. At this point, we have successfully created a new PostgreSQL connection in QGIS.
Step 2. Export the Spatial Data
Watch the video below to export spatial data to PostGIS
You can do the same step for points and polygon.
