Filtering results for PropertyIsEqualTo and SQL character(n) columns
--------------------------------------------------------------------

                 Key: GEOT-3488
                 URL: http://jira.codehaus.org/browse/GEOT-3488
             Project: GeoTools
          Issue Type: Bug
          Components: core filter
    Affects Versions: 2.7-beta1
         Environment: GeoServer 2.1RC1
            Reporter: Clive Butler
            Priority: Minor


I have a dataset in a PostgreSQL database that has some character(n) columns, 
and a GeoServer instance using SLD styling. When a filter uses 
PropertyIsEqualTo on a character(n) column for which the stored value is 
shorter than the declared number of characters (and is therefore space-padded), 
the comparison fails unless the filter literal is given a sufficient number of 
trailing spaces to make it the same length as the database column definition 
(note that the SQL WHERE succeeds but the GeoTools filter excludes matches 
based on its own comparison).

I would argue that the comparison should respect the SQL definition of equals 
for a comparison involving a fixed-size character value, i.e. treat the 
trailing spaces as semantically insignificant. Filter creators (and SLD 
writers) should not have to know this type of detail.

This issue is analogous to having the right number of trailing 0 digits after 
the decimal point..

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to