[postgis-devel] [PostGIS] #680: Surprise surprise: Crash on geography ST_AsBinary for PointM

PostGIS trac at osgeo.org
Tue Dec 7 22:24:38 PST 2010


#680: Surprise surprise: Crash on geography ST_AsBinary for PointM
---------------------+------------------------------------------------------
 Reporter:  robe     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  blocker  |   Milestone:  PostGIS 2.0.0
Component:  postgis  |     Version:  trunk        
 Keywords:           |  
---------------------+------------------------------------------------------
 Well this is as far as I got before my server crashed with your new
 changes.

 -- this is okay --
 {{{
 SELECT geography(foo1.the_geom) As result
 FROM ((SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom FROM
 generate_series(-10,50,10) As i CROSS JOIN generate_series(50,70, 20) AS j
 CROSS JOIN generate_series(1,2) As m ORDER BY i, j, i*j*m)) As foo1 LIMIT
 3;
 }}}

 -- but then applying an ST_AsBinary -- get a crash, though

 {{{
 SELECT ST_AsBinary(geography(foo1.the_geom)) As result
 FROM ((SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom FROM
 generate_series(-10,50,10) As i CROSS JOIN generate_series(50,70, 20) AS j
 CROSS JOIN generate_series(1,2) As m ORDER BY i, j, i*j*m)) As foo1 LIMIT
 3;
 }}}

 -- ST_AsText doesn't crash but fails PostGIS 1.5 regression --

 On 1.5

 {{{
 SELECT ST_AsText(geography(foo1.the_geom)) As result
 FROM ((SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom FROM
 generate_series(-10,50,10) As i CROSS JOIN generate_series(50,70, 20) AS j
 CROSS JOIN generate_series(1,2) As m ORDER BY i, j, i*j*m)) As foo1 LIMIT
 3;
 }}}
 -- returns

 {{{
 POINTM(-10 50 2)
 POINTM(-10 50 1)
 POINTM(-10 70 2)
 }}}

 On new 2.0 the M is missing


 {{{
 POINT(-10 50)
 POINT(-10 50)
 POINT(-10 70)

 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/680>
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-devel mailing list