After some hacking
The syntax
'[castle]' =~ /t/
Does the trick, horrible and not very clear for the beginner there must
be a better way of writing a test for boolean expression!
D.
David Potts wrote:
Hi
Is there a problem with the use of the postgres boolean type in mapserver?
I have a data type of type boolean in my database type called castle
I have tried to use the following syntax(see below) , I would have assumed
that if pt.castle was set to true, then this layer would have been drawn
STATUS DEFAULT
DEBUG ON
CONNECTIONTYPE POSTGIS
CONNECTION "dbname=dday_kent user=dp42 host=localhost
port=5432"
DATA "os_ngr from (
select pt.place_id, pt.place_name,pt.os_ngr as
os_ngr ,pt.castle as castle, pt.manor
from place_table pt where pt.os_ngr is not null
)
as foo using srid=27700 using unique place_id"
CLASS
LABEL
SIZE large
OUTLINECOLOR 255 255 0
END
NAME "Castle"
SIZE 40
EXPRESSION ( '[castle]' eq 't' )
OUTLINECOLOR 0 255 0
END
I have tried expresions such as
"[castle] = "1"
"[castle] = "t"
"[castle] = "TRUE"
nothing seems to make a difference, the expression always returns false.
I am using mapserver 5.02 and postgis 1.32.
Has anybody seen anything like this before?
Dave.
begin:vcard
fn:David Potts
n:Potts;David
x-mozilla-html:FALSE
version:2.1
end:vcard
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users