7

This is a follow-up question on how to Delete multiple features easily in QGIS?.

When hitting the delete button after selecting a set of features from a PostGIS table, QGIS reports an error:

Provider does not support deletion: Data provider does not support deleting features.

This is with QGIS 3.0 and after enabling edit mode using the edit toolbar. Apparently, I can add a new feature but not allowed to delete it.

Is there a workaround on this to allow deleting PostGIS features interactively?

tinlyx
  • 11,057
  • 18
  • 71
  • 119
  • hm I can´t seem reproduce that error on DB role management level...double checked all privileges and roles involved? a rather brutish workaround would be to create a temp layer from the selection and replace the DB table via upload (check replace destination table)... – geozelot Jun 13 '18 at 12:21

2 Answers2

13

Had same problem with a PG table. The problem was that the table had no primary key.

Added a serial column as PK, removed and re-added the table in QGIS. Problem solved.

Maybe the error msg should be more specific.

rov66
  • 131
  • 1
  • 3
0

Is it possible the underlying PostgreSQL user does not have delete permissions? If so you will not be able to delete features in QGIS.

  • Thanks for the input. The postgresql account I use in QGIS is the database owner. I just tested DELETE FROM that table, and was able to delete all the features via SQL. – tinlyx Jun 12 '18 at 22:04