[Mapserver-users] query postgis layer (boolean conversion problem)
Twan Kogels
twan at twansoft.com
Wed Jul 9 00:38:07 PDT 2003
Hallo David,
Sorry for the late reply, but i was out of the house for a couple of days.
Thanks for the reply, i tried it immediately this morning and it works. I
can now query the postgis layer without problems.
Best regards,
Twan Kogels
At 09:38 7-7-2003 -0700, you wrote:
>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;
>
>
More information about the MapServer-users
mailing list