Bug report #18442

Trouble with geopackage fields length settings

Added by Dominique Lyszczarz about 6 years ago. Updated almost 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Attribute table
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

Description

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)

screenshoot 2 - resulting fields definition.jpg (22.6 KB) Dominique Lyszczarz, 2018-03-14 06:17 PM

screenshoot 1 - new gpkg layer no length setting for decimal field.jpg (50.8 KB) Dominique Lyszczarz, 2018-03-14 06:17 PM

screenshoot 3 - setup decimal input form.jpg (66.4 KB) Dominique Lyszczarz, 2018-03-14 06:17 PM

screenshoot 4 - fields changes after saving to gpkg.jpg (66.8 KB) Dominique Lyszczarz, 2018-03-14 06:17 PM

History

#1 Updated by Giovanni Manghi about 5 years ago

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

#2 Updated by Giovanni Manghi about 5 years ago

  • Status changed from Closed to Open

#3 Updated by Roberto Uhlig almost 5 years ago

at least the "string-part" should be solved with #21714

#4 Updated by Alessandro Pasotti almost 5 years ago

Yes, that's certainly the same bug.

If the other one is still an issue please file a new bug against 3.x.

#5 Updated by Dominique Lyszczarz almost 5 years 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.

#6 Updated by Alessandro Pasotti almost 5 years ago

definitely a separate bug, please file a ticket.

Also available in: Atom PDF