[Mapserver-users] problem with PostGIS layers with a bit() column
David Blasby
dblasby@refractions.net
Fri, 30 Apr 2004 09:27:31 -0700
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
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users