Opened 14 years ago
Closed 14 years ago
#680 closed defect (fixed)
Surprise surprise: Crash on geography ST_AsBinary for PointM
Reported by: | robe | Owned by: | pramsey |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 2.0.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
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)
Note:
See TracTickets
for help on using tickets.
Fixed in trunk after r6299. Note we don't have consistent behavior right now… asbinary is returning 2D only and always and astext is returning ISO text. We haven't quite gotten agreement on our output scheme yet (though perhaps I should pursue the GUC).