Ticket #648 (closed defect: fixed)

Opened 3 years ago

Last modified 16 months ago

ST_Summary starts and ends with a newline

Reported by: mwtoews 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

Changed 2 years ago by robe

  • milestone changed from PostGIS 2.0.0 to PostGIS 1.5.4

Changed 19 months ago by strk

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

Changed 16 months ago by strk

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from PostGIS 1.5.4 to PostGIS 2.0.0

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

Note: See TracTickets for help on using tickets.