[mapserver-users] WFS filter creates a query using a number instead of text

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Fri Mar 21 07:49:47 PDT 2014


The problem is when we send a string that represents a number, example:
Filter=<Filter><PropertyIsEqualTo><PropertyName>code_cs
</PropertyName><Literal>864000</Literal></PropertyIsEqualTo></Filter>

I get:
ERROR:  operator does not exist: character varying = integer
"code_cs"= 864000

DescribeFeatureType returns
<element name="code_cs" type="string" />

In posgis, code_cs is defined as character varying(18)

My workaround is using Like instead of EqualTo
Filter=<Filter><PropertyIsLike wildcard='*' singleChar='.' 
escape='!'><PropertyName>code_cs</PropertyName><Literal>864000</Literal></PropertyIsLike></Filter>

Is this a bug in mapserver, creating the query using a number, even if 
DescribeFeatureType returns 'string' as type?

thanks
Steve


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140321/0e35e8fb/attachment.html>


More information about the mapserver-users mailing list