Bug report #14258
Line width size assistant fails to load values when column is name "LENGTH"
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Symbology | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 22254 |
Description
The assistant fails to load values of a variable (length, real) from a particular layer.
Other variables (integers, strings) are loaded.
History
#1
Updated by Paolo Cavallini about 9 years ago
- File strade.zip added
#2
Updated by Giovanni Manghi about 9 years ago
- Status changed from Open to Feedback
it works if you use the same datatype but use a different column name... "LENGTH" looks like a reserved word.
#3
Updated by Paolo Cavallini about 9 years ago
Good point. However, LENGTH is a valid column name in DBF, and I do not think we should impose additional limitations.
#4
Updated by Giovanni Manghi about 9 years ago
- OS version deleted (
Sid) - Subject changed from Line width size assistant fails to load values to Line width size assistant fails to load values when column is name "LENGTH"
- Status changed from Feedback to Open
- Operating System deleted (
Debian)
Paolo Cavallini wrote:
Good point. However, LENGTH is a valid column name in DBF, and I do not think we should impose additional limitations.
It is a bad practice anyway, I would not be contrary having QGIS not creating columns after any reserved word.
#5
Updated by Regis Haubourg about 9 years ago
I think it is related to #14257. Can you test adding double quotes on field name "LENGTH" manually the size expression generated?
#6
Updated by Paolo Cavallini about 9 years ago
I confirm that with quotes the expression is valid. I cannot check whether variable content is recognized.
I do not agree calling length (or area, etc.) is bad practice: field calc automatically add it.
#7
Updated by Regis Haubourg about 9 years ago
Well, if postgres can be a reference implementation of SQL for us, user fields name is illegal as a SQL keyword when "user" is legal.
Can we just focus on QGIS quoting correctly field names with capitalized , special characters or reserved keywords ?
#8
Updated by Giovanni Manghi about 9 years ago
- Status changed from Open to Closed
- Resolution set to duplicate
duplicate of #14257
#9
Updated by Paolo Cavallini about 9 years ago
- Status changed from Closed to Reopened
- Resolution deleted (
duplicate)
Duplication is possible, but AFAIK not demonstrated. Better leave it open and close it after fix of #14257 and verification.
#10
Updated by Giovanni Manghi almost 8 years ago
- Easy fix? set to No
- Regression? set to No
#11
Updated by Paolo Cavallini about 7 years ago
- Status changed from Reopened to Closed
- Description updated (diff)
- Resolution set to fixed/implemented
Fixed now. Tested in QGIS 3.