Opened 14 years ago

Last modified 13 years ago

#2486 new bug

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

Reported by: mwtoews Owned by: jef
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Symbology Version: Trunk
Keywords: Cc: m.diener@…
Must Fix for Release: No Platform: Windows
Platform Version: Awaiting user input: no

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.

Change History (2)

comment:1 by springmeyer, 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

comment:2 by jef, 13 years ago

Owner: changed from nobody to jef
Note: See TracTickets for help on using tickets.