[postgis-users] Strange type casts

Charlie Savage cfis at savagexi.com
Fri Apr 17 13:55:20 PDT 2009


Install postgis and make sure it is on your postgresql search_path.

Then run this query:

select 'abc'::text = decode('YWJj', 'base64')

Its results in this:

ERROR:  parse error - invalid geometry

********** Error **********

ERROR: parse error - invalid geometry
SQL state: XX000


I see that postgis defines the = operator between two geometries.  Which
seems to mean that the text on the left side is converted automatically
to a geometry and the bytea on the right side to a geometry
automatically.  That's surprising to say the least...

Charlie



More information about the postgis-users mailing list