Bug report #5154

Need to check that precision<field width when adding a column

Added by Alister Hood about 12 years ago. Updated about 8 years ago.

Status:Closed
Priority:Normal
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 #:14906

Description

The "New Column" button in the attribute table window allows you to add a column even if you specify a precision greater than the field width you specify. It is then impossible to enter data in the column.

I'm guessing the field calculator would allow you to do the same thing, but I haven't tested it.


Related issues

Related to QGIS Application - Bug report #14019: Problems with a field where precision = length Closed 2015-12-20

Associated revisions

Revision 9d473aae
Added by Alexander Bruy about 8 years ago

don't allow field precision greater than field width (fix #14019, #5154)

Revision c1f7257b
Added by Nyall Dawson about 8 years ago

Merge pull request #2682 from alexbruy/field-precision

don't allow field precision greater than field width (fix #14019, #5154)

History

#1 Updated by Paolo Cavallini over 11 years ago

  • Target version set to Version 2.0.0

#2 Updated by Alister Hood over 11 years ago

I'm guessing the field calculator would allow you to do the same thing, but I haven't tested it.

Using the field calculator you can add a column with a precision greater than the field width, but this way it is possible to enter data in the column.

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

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#4 Updated by Médéric RIBREUX over 8 years ago

  • Status changed from Open to In Progress

Hello, bug triage...

in QGIS 2.13 master, you can't set a precision greater than the field length for decimal number (real) in the "Add field" tool in the Fields tab of the layer properties.
BUT, this is not true field calculator where you can modify the precision field like you want with no limit.

Half way done ! I think (unchecked) that we need to make some code fixes into src/app/qgsfieldcalculator.cpp...

#5 Updated by Nyall Dawson about 8 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF