2

I noticed a strange behavior in layers created with DB manager. Tested it in QGIS 2.6.1 and QGIS 2.12.0

In QGIS 2.6.1. When i create a layer based on a sql query with the setting "Avoid selecting by feature id" turned off, i cannot start editing session on this new layer. The "start editing" button is inactive. When i create a layer based on the same sql query with "Avoid selecting by feature id" turned on, the editing button in QGIS gets activated, i can start editing session but "Add feature" and "Save layer edits" buttons stay inactive. I can move any features or nodes on a feature, but still i cannot save the edits.

In QGIS 2.12.0 There is no difference, if i set "Avoid selecting by feature id" on or off, editing button is inactive and i cannot start editing session.

Is it a bug, am i doing something wrong or is QGIS ment to behave like this? And what is this "Avoid selecting by feature id" option for?

O, and the data i want to edit comes from a PostGis database.

6
  • What type of layer are you using?
    – CARTOS
    Commented Dec 25, 2015 at 22:13
  • I am trying to edit vector layers. There's no significant difference, whether its points, lines or polygon features.
    – Marty
    Commented Dec 28, 2015 at 8:06
  • Oh I meant format type. Shp?
    – CARTOS
    Commented Dec 28, 2015 at 8:16
  • No, data is in PostGIS.
    – Marty
    Commented Dec 28, 2015 at 8:23
  • And the PostGIS-database is set with the extensions topology and tiger?
    – CARTOS
    Commented Dec 28, 2015 at 10:08

1 Answer 1

1

I posted a bug report and got this response: "Avoid selecting by feature id" option is not related to editing capabilities of a layer loaded from query. Apparently it was a bug in QGIS 2.6, but got fixed. The layers loaded from querys are handled as views, so they are not supposed to be editable. Good to know.

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.