I am editing feature in a PostgreSQL table in QGIS 3 and while I can edit the values in most columns, I cannot edit the Boolean value.

I can enter the cell in edit mode, but keystrokes don't work. I've tried to type true, 1, ctrl-mousewheel, double-clicking.
enter image description here

Aside from the obvious workaround of a SQL Update statement, is there a trick to changing a Boolean value within QGIS?

enter image description here

QGIS version
3.4.2-Madeira QGIS code revision 22034aa070 Compiled against Qt
5.11.2 Running against Qt
5.11.2 Compiled against GDAL/OGR
2.3.2 Running against GDAL/OGR
2.3.2 Compiled against GEOS
3.7.0-CAPI-1.11.0 Running against GEOS
3.7.0-CAPI-1.11.0 673b9939 PostgreSQL Client Version
9.2.4 SpatiaLite Version
4.3.0 QWT Version
6.1.3 QScintilla2 Version
2.10.8 Compiled against PROJ 520 Running against PROJ
  • Can you add a screenshot of the Source Fields settings (in the Layer Properties window)? QGIS won't let me create a Boolean field, so I'm curious how QGIS interprets this field type. It might be possible to choose a different edit widget, but I have no way to test that. – csk Dec 7 '18 at 18:47
  • Thanks for adding the screenshot! I notice that the boolean field doesn't have a graphic representing the data type next to the ID, whereas the other fields have 'abc' for text or '123' for integer. This makes me think that QGIS isn't sure how to interpret your boolean field. In this question, QGIS 2.x automatically converted a boolean field from postgis to string type. – csk Dec 7 '18 at 19:18
  • I'm glad one of my suggestions helped. You could post it as an answer. – csk Dec 7 '18 at 19:36
  • yeah...i'm trying to decide if this question counts as a dupe or not! I figure I'll leave it up for a bit before deleting it. Maybe there's another answer that is better! – Jay Cummins Dec 7 '18 at 19:37
  • Well, in case you do delete your question, please satisfy my curiosity. What worked? Was it changing the edit widget? Or did you find a way to convert the field to string type? – csk Dec 7 '18 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.