Bug report #17862

Empty text field in attribute table should default to NULL, not ""

Added by Kory Roberts almost 7 years ago. Updated over 5 years ago.

Status:Feedback
Priority:Low
Assignee:-
Category:Attribute table
Affected QGIS version:master Regression?:No
Operating System:Linux Mint 18.3 Cinnamon Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25757

Description

In editing SQLite field data using the Attribute Table of QGIS, the default for empty TEXT fields seems to be "" (i.e. no text), but I believe the default should be NULL instead, just as it is for INTEGER (and other?) fields.

Another option would be to make no change to how it was originally (if NULL, keep it NULL; if "", keep it ""), unless explicitly indicated by the user. (It seems now one has to enter the text "NULL" to explicitly change it.) Another thought is to automatically add "NULL" when all text is deleted from a cell and then the user could maybe delete that to indicate an empty cell is wanted instead?

History

#1 Updated by Kory Roberts almost 7 years ago

Sorry, meant for this to be a feature request rather than bug.

#2 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback

Please check if this issue is still valid on QGIS 3.4.5 or 3.6.

Also available in: Atom PDF