[postgis-devel] bool::text

Markus Schaber schabios at logi-track.com
Thu Feb 24 07:41:07 PST 2005


Hi, Strk,

strk at refractions.net schrieb:

> When you have a bool field bool::text didn't work as postgresql doesn't
> provide that cast (altought provides text::bool).

Ok, now I understand, thanks.

But I don't exactly feel comfortable with introducing implicit casts for
such basic data types. I have the obscure feeling that this might break
something.

Maybe you could remove the "AS IMPLICIT" from the create cast declaration?

And in the long term, this should really be moved to PostgreSQL itself,
as it is outside the scope of PostGIS, IMHO.

One can also directly call the canonical text output function for bool,
boolout(), would this be an alternative for mapserver?

select boolout('t'::bool);
 boolout
---------
 t
(1 Zeile)

Or using "select case when 'f'::bool then 't' else 'f' end".

Thanks,
Markus
-- 
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios at logi-track.com | www.logi-track.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20050224/1060181d/attachment.sig>


More information about the postgis-devel mailing list