Opened 14 years ago

Closed 12 years ago

#648 closed defect (fixed)

ST_Summary starts and ends with a newline

Reported by: Mike Taves Owned by: pramsey
Priority: low Milestone: PostGIS 2.0.0
Component: postgis Version: 1.5.X
Keywords: Cc:

Description

Pick your favourite geometry, pass it to ST_Summary and it will both begin and end with \n newline characters.

select st_summary(geometry), regexp_replace(st_summary(geometry), E'\\n', E'\\\\n', 'g')
from (
  select 'SRID=4326;POINT EMPTY'::geometry
  union all select 'MULTIPOLYGON(((0 0 0, 0 1 1, 1 0 2, 0 0 0)), ((10 10 2, 12 10 4, 12 12 3, 10 10 2)))'::geometry
  union all select 'SRID=4326;LINESTRING(0 0 0 0, 1 1 1 1)'::geometry) as foo;

If you use pgAdminIII, you incorrectly see blank lines from ST_Summary, unless you expand the row heights from the default to revel the multitiline output where text begins on the second line.

The output from multiline PostgreSQL functions (e.g., select table_to_xml('geometry_columns', true, true, 'foo');) does not have this behaviour. Newlines should only appear within the text body, and not on the ends.

Change History (3)

comment:1 by robe, 13 years ago

Milestone: PostGIS 2.0.0PostGIS 1.5.4

comment:2 by strk, 13 years ago

This is already fixed in 2.0, do we really want to change the output in 1.5.4 ?

comment:3 by strk, 12 years ago

Milestone: PostGIS 1.5.4PostGIS 2.0.0
Resolution: fixed
Status: newclosed

2.0.0 is good, 1.5 we don't care in this case.

Note: See TracTickets for help on using tickets.