Bug report #8145
Field calculator does not work when creating new PostGIS real and double columns
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||16973|
When computing a new column of type real or double, it seems that is ok, but after saving edits and closing/reopening the column this is filled with just nulls.
Updating the new column works fine.
Numeric and decimal types are not affected.
Works ok on 1.8
#5 Updated by Matthias Kuhn over 7 years ago
- Assignee set to Jürgen Fischer
The problem is, that the postgres provider assigns -1 / 0 to field size / field precision differently that they are assigned in the NativeTypes (it's 0 as default argument there)
When committing, the fields from the vector layer and the newly created provider fields are compared and the process is aborted because they don't seem to be equal.
It's similar to 0b780b0a
Jef: I'll leave it to you to decide if the postgres provider or the QgsField::operator== should be adjusted.