[mapserver-dev] Boolean class expression Mapserver 7.2

Lime, Steve D (MNIT) steve.lime at state.mn.us
Thu Dec 20 07:55:26 PST 2018


What data type is the "something" column in your case? I'll whip up a quick test and see what the translated SQL looks like. --Steve

From: Karin Kuipers [mailto:Karin.Kuipers at kartverket.no]
Sent: Thursday, December 20, 2018 1:11 AM
To: Lime, Steve D (MNIT) <steve.lime at state.mn.us>; mapserver-dev at lists.osgeo.org
Subject: SV: Boolean class expression Mapserver 7.2

Hi Steve,

"you're saying you have data where something = 'f' and it works in 7.0 but not in 7.2"
That is indeed what I am trying to say.

The portgis data is 'true' or 'false' (data type boolean) in Mapserver we query this with 't' and 'f'

I have a WMS build in 7.0 with the == 'f' expression
We want to upgrade to 7.2 and during testing the layer with =='f' expression fails.

When changing the expression to != 't' the layer works again.

With kind regards,
Karin

Fra: Lime, Steve D (MNIT) [mailto:steve.lime at state.mn.us]
Sendt: 19. desember 2018 16:55
Til: Karin Kuipers <Karin.Kuipers at kartverket.no<mailto:Karin.Kuipers at kartverket.no>>; mapserver-dev at lists.osgeo.org<mailto:mapserver-dev at lists.osgeo.org>
Emne: RE: Boolean class expression Mapserver 7.2

Hi Karin: All of the example expressions below represent straight string comparisons so for ("[something]" == 'f') to evaluate to true the value for something would need to be 'f', same goes for all the others. 'f', 't' and 'false' are just strings and are not equivalent to true/false - you'd use something like ([something] == true) if you really wanted that type of comparison.

Anyway, just so I understand, you're saying you have data where something = 'f' and it works in 7.0 but not in 7.2?

--Steve

From: mapserver-dev [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Karin Kuipers
Sent: Wednesday, December 19, 2018 3:03 AM
To: mapserver-dev at lists.osgeo.org<mailto:mapserver-dev at lists.osgeo.org>
Subject: [mapserver-dev] Boolean class expression Mapserver 7.2

Dear sir/madame,

I think I found an issue with the boolean class expression in Mapserver 7.2

On 7.0 ("[something]" == 'f') works

On 7.2 ("[something]" == 'f') does not work but ("[something]" != 't') works fine and ("[something]" == 'false') is fine as well.

Connection is to a postgis database.

With kind regards,

Karin Kuipers

[logo_sign]

Karin Kuipers
Overingeniør GIS-Specialist
IT-avdelingen, Geodatatjenester -I5
Tlf.: +47 321 13036 mob.:+47 46 213 198
E-post: karin.kuipers at kartverket.no<mailto:karin.kuipers at kartverket.no>

Tlf. sentralbord: 32 11 81 00
Kundesenter: 08700
www.kartverket.no<http://www.kartverket.no/>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20181220/3ce67985/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4450 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20181220/3ce67985/attachment-0001.png>


More information about the mapserver-dev mailing list