Bug report #2486

Unique value symbology doesn't work in canvas with postgres "character" data type

Added by Mike Taves about 14 years ago. Updated about 5 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Symbology
Affected QGIS version:master 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 #:12546

Description

If a unique value symbology is applied to a PostGIS layer with a data type "character", it can be formatted normally in the layer properties dialog with expected results in the "Layers" pane. However, the lines are not formatted in the map canvas as expected, as all lines use the "default" (blank) classification.

A possible cause of the problem is that the data type "character" will pad spaces to the specified width, for example "food" stored in character(5) will actually be "food ", having a trailing space to fit 5 characters.

As a workaround, change the postgres data type in problem columns to "character varying", if possible.

History

#1 Updated by springmeyer - about 14 years ago

ya, generally you don't want to use 'character' type, but when you do QGIS likely should not strip the padded whitespace.

I've not dug into this in a while, but noticed the issue via the Quantumnik plugin. Details here:

http://trac.mapnik.org/ticket/369

#2 Updated by Giovanni Manghi over 12 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#3 Updated by Paolo Cavallini about 12 years ago

  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Affected QGIS version set to master
  • Crashes QGIS or corrupts data set to No

#4 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#5 Updated by Jürgen Fischer almost 10 years ago

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

#6 Updated by Jürgen Fischer about 8 years ago

  • Pull Request or Patch supplied set to No

#7 Updated by Jürgen Fischer about 8 years ago

  • Resolution set to worksforme

not reproducable anymore

#8 Updated by Giovanni Manghi almost 7 years ago

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

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

  • Assignee deleted (Jürgen Fischer)

#10 Updated by Giovanni Manghi about 5 years ago

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

Also available in: Atom PDF