[mapserver-dev] Problem with WFS GET_FEATURE query, if value seems to be numeric, but data type in database is text like

Yewondwossen Assefa yassefa at dmsolutions.ca
Thu Feb 10 09:54:08 EST 2011


Hi Peter,

  Usually the quotes/no quotes decision is  based on the value of the 
element in the filter. It is also possible to specific the type of an 
attribute by doing things like gml_myattributename_type 'Character' .
I see that this mechanism was not applied fr FeatureId type OGC flter 
queries. I have opened a bug on it [1] and provided a patch the thr 
5.6.x version. Let me know through the bug if that satisfies your case.

regards

[1]: http://trac.osgeo.org/mapserver/ticket/3670


On 10/02/2011 5:45 AM, Peter Hopfgartner wrote:
> In mapogcfilter.c, (MapServer 5.6.6 around line 2897, in trunk around line 2088), if pszTmp parses as numeric, quotes are not set in the SQL expression.
>
> If the associated database table field is of a text type, this produces a run time error on PostgreSQL 8.4 and later, since many casts from and to text were dropped.
>
> Analogous things happen around line 3375 (MapServer 5.6.6).
>
> I guess, that for PostgreSQL the quotes could always be set, I do not know for other data sources. At least it works us.
>
>
>
> Regards,
>
>
>
> Peter Hopfgartner
>
>
>
> R3 GIS Srl - GmbH
>
> http://www.r3-gis.com
>
>
>
>
>
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: yassefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------




More information about the mapserver-dev mailing list