[Mapserver-users] problem with PostGIS layers with a bit() column
David Blasby
dblasby at refractions.net
Fri Apr 30 09:27:31 PDT 2004
Perry Casson wrote:
> Here's the error:
> Fatal error: [MapServer Error]: msPOSTGISLayerGetShape(): Error
> executing POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor2 BINARY
> CURSOR FOR SELECT
> esn::text,gmuid::text,messageid::text,timestamp::text,recievedat::text,devicetype::text,identifier::text,isgps::text,longitude::text,latitude::text,gpsvalid::text,gpstime::text,v1::text,v2::text,v3::text,max1::text,max2::text,max3::text,actuator_previous::text,actuator_current::text,userdata::text,battery::text,asbinary(force_collection(force_2d(geo)),'NDR')
> from wp_point WHERE OID = 27497 -ERROR: Cannot cast type bit to text
As the error says, it cannot convert the bit type to text.
You can fix this by either:
1. adding a conversion and CAST function to convert bit to text
2. change your column type from bit to char. You can also add a
constraint on the the table that says (<column> ='1' OR <column> ='0').
dave
More information about the MapServer-users
mailing list