I am trying to export a selected set of features from a PostGIS layer into a new layer. But when I go to the context menu for the later and choose Export -> Save Selected As ..., there is no option for saving the selection into PostGIS. The only options are GeoPackage, Shapfiles etc:

enter image description here

Is there a way to save to PostGIS without going through these other format first?

(This is with Ubuntu 18.04, QGIS 3.6, PostgreSQL 11, PostGIS 2.5).

2 Answers 2


You can use DB Manager for this purpose but first you need to create postgis connection to that database using QGIS. To create PostGIS connection

  1. Open QGIS and right click on PostGIS icon in QGIS browser as shown in image below.

    enter image description here

  2. Provide the DB connection details in the form shown below and click ok.

    enter image description here

After you create connection open DB Manager

  1. In the list of PostGIS databases find the one you want to export to.
  2. Find the desired schema and press import layer button as shown below.

    enter image description here

  3. Choose the shape file in 'input' (Has to be in your 'Layers Panel') and press 'ok' enter, you can refer to image below

enter image description here

That's it. Your shape file is now a table in PostGIS.


you can use db manager for this. Everything is explain in this post : How to export shapefiles from QGIS to PostGIS?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.