[Mapserver-users] query postgis layer (boolean conversion problem)
David Blasby
dblasby@refractions.net
Mon, 07 Jul 2003 09:38:50 -0700
No, this is a bug with postgresql - they dont have a default
boolean->text type cast.
If you're using 7.2, add this function:
CREATE FUNCTION text(bool) returns text as 'SELECT ''t'' WHERE $1 UNION
SELECT ''f'' WHERE NOT $1' language 'SQL' with (iscachable,isstrict);
On 7.3 (and 7.4), you'll ALSO have to add:
CREATE CAST (boolean AS text) WITH FUNCTION text(bool) AS IMPLICIT;
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users