Bug report #18442
Trouble with geopackage fields length settings
|Affected QGIS version:||3.0.0||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||end of life|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||26330|
I encounter some annoying difficulties with fields length on geopackage layers
1. When creating a new gpkg layer with a decimal fields, the dialog does not allows to define the field length and precision (screenshoot 1). In layer properties the field appear to have 0 length and 0 precision (screenshoot 2). Consequence, when adding a new feature the popup form does not allow to enter any decimal value. The user must define specificaly the input form settings for each decimal field (screenshoot 3).
2. Saving a layer to gpkg always change fields parameters, for exemple a string with a length of 1000 is reduced to 255, a decimal field with length 20 and precision 5 is reduced to zero length and zero precision (screenshoot 4)
#1 Updated by Giovanni Manghi 11 months ago
- Status changed from Open to Closed
- Resolution set to end of life
End of life notice: QGIS 2.18 LTR
#5 Updated by Dominique Lyszczarz 10 months ago
Trying to reproduce this issue with decimal fields, in fact it's just related to my locale setting. On my system the locale is automatically set to French langage using the comma as decimal delimiter. But with this setting the text editor widget (used by default for all numerical fields) does not allow writing a decimal delimiter with the numeric keypad's dot key. As the field precision is reported to be zero, I was the feeling that it's not possible to enter any decimal number at all (usually most of software automatically translate the numeric keypad's dot delimiter to a locale comma if needed). Finally, using the regular comma key works fine and changing the locale setting unlock the dot key from the numeric keypad.