[postgis-tickets] [PostGIS] #2185: Geometry output functions crash server with invalid WKT

PostGIS trac at osgeo.org
Wed Jan 23 22:23:44 PST 2013


#2185: Geometry output functions crash server with invalid WKT
------------------------+---------------------------------------------------
 Reporter:  mwtoews     |       Owner:  robe         
     Type:  defect      |      Status:  new          
 Priority:  blocker     |   Milestone:  PostGIS 2.0.3
Component:  postgis     |     Version:  2.0.x        
 Keywords:  windows 64  |  
------------------------+---------------------------------------------------

Comment(by robe):

 I'm beginning to think this is a bug in PostgreSQL rather than PostGIS.
 What is really really odd why I think that is that the ST_AsText function
 called with unknown is nothing but this:


 {{{
 CREATE OR REPLACE FUNCTION st_astext(text)
   RETURNS text AS
 ' SELECT ST_AsText($1::geometry);  '
   LANGUAGE sql IMMUTABLE STRICT
   COST 100;
 }}}


 And yet if you call:


 {{{
 SELECT ST_AsText('POINT(3 4 hi)'::geometry);
 }}}

 IF doesn't crash.  How bizarre is that? It's almost like the IMMUTABLE
 STRICT is having a weird side effect.

 pramsey -- I thought we had an issue like this where wrapping logic in a
 fucntion would craash but calling the same logic explicitly wouldn't, but
 can't recall what that ticket was.  Does that sound familiar?

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2185#comment:12>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list