Bug report #14691

Type changing from INTEGER (10) to QSTRING in QGIS 2.8.8

Added by Thomas Nogatz about 8 years ago. Updated about 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Attribute table
Affected QGIS version:2.8.8 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:22655

Description

Shapefile field type INTEGER (length 10) will be changed to QSTRING (Typename INTEGER64) automatically in QGIS 2.8.8. after closing and restarting QGIS.
Creating a new shapefile there is the field ID with type INTEGER 10 - here the type will be changed during creating process - no need to close and restart QGIS.
Other types (also INTEGER length 1 ... 9) seem to be not affected.

History

#1 Updated by Jukka Rahkonen about 8 years ago

I guess that this comes from the limitations of the .dbf format http://devzone.advantagedatabase.com/dz/webhelp/Advantage9.0/server1/dbf_field_types_and_specifications.htm. Integers are written with 4 bytes and possible values are from -2,147,483,648 to 2,147,483,647. A value like 3,000,000,000 has 10 digits but it is too long to fit into 8 bytes.
Having at maximum 9 digits in integers is safe but by the same the values from 1,000,000,000 to 2,147,483,647 are lost. On the negative side the loss is perhaps bigger if the minus sign takes also one place.

#2 Updated by Giovanni Manghi about 7 years ago

  • Priority changed from Normal to High

#3 Updated by Giovanni Manghi about 7 years ago

  • Crashes QGIS or corrupts data changed from Yes to No
  • Priority changed from High to Normal

#4 Updated by Giovanni Manghi almost 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#5 Updated by Giovanni Manghi about 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF