Bug report #12004

Column width behaviour is inconsistent (for shapefiles)

Added by Giovanni Manghi almost 10 years ago. Updated over 9 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Vectors
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 #:20207

Description

When you add a new integer column in a shapefile you cannot choose to have a width of more than 10, because anyway the format cannot fit bigger numbers: the upper limit is 2147483647

  • in recent qgis releases (like master) a user can enter a 10 digit number bigger than 2147483647, and it will stick even after saving, just to see it become -2147483648 when reopening the table of attributes. In previous qgis releases (like qgis 2.0.1) entering (for example) 2147483648 would have become immediately "null" warning the user something it was wrong. This is a regression.
  • a user can create a column that has more that 10 digits for the integer part, by creating for example a float column like (example) 20/0, and this is inconsistent with the "integer column" width limit. Moreover in such float column the user can really enter a number with more than 10 digits for the integer part. On releases like qgis 2.0.1 it will overflow (-2147483648) once the table is closed and reopened, on later releases (like 2.6.1 and master) the number will surprisingly stick, in fact in a 20/0 float column the user can enter a 20 digit integer number apparently with no issues (beside the fact that if the field is edited in releases like qgis 2.0.1 then it will overflow).

Associated revisions

Revision 065d190d
Added by Jürgen Fischer over 9 years ago

improve field conversions (fixes #12004)

History

#1 Updated by Jürgen Fischer over 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF