Bug report #8145
Field calculator does not work when creating new PostGIS real and double columns
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Jürgen Fischer | ||
Category: | Data Provider/PostGIS | ||
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 |
Description
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
Related issues
Associated revisions
postgres provider: set length and precision of native floating point types to -1 (fixes #8145)
History
#1 Updated by Matthias Kuhn over 11 years ago
- Status changed from Open to Feedback
Unable to reproduce using the field calculator. Can you provide more detailed instructions please.
#2 Updated by Giovanni Manghi over 11 years ago
- File postgis_fc.mp4 added
Matthias Kuhn wrote:
Unable to reproduce using the field calculator. Can you provide more detailed instructions please.
see attached screencast
#3 Updated by Salvatore Larosa over 11 years ago
confirmed here !
#4 Updated by Matthias Kuhn over 11 years ago
I can reproduce it now. I don't know what the problem was before.
#5 Updated by Matthias Kuhn over 11 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.
#6 Updated by Jürgen Fischer over 11 years ago
- Status changed from Feedback to Closed
Fixed in changeset f2031053878af267ef5fa77b676a7907ede8294d.