Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#630 closed defect (fixed)

ST_COLLECT null treatment

Reported by: bitner Owned by: chodgson
Priority: medium Milestone: PostGIS 1.5.3
Component: postgis Version: 1.5.X
Keywords: Cc: bitner@…

Description

ST_COLLECT behaves differently than I would expect it to behave if an array with a null value is passed in. Rather than either completely bailing on a null value or returning a collection without the null value either not included (which is what I would love to see :-) ) or containing an empty geometry it simply includes all values in the array until the null value is encountered.

Tests: SELECT ASEWKT(ST_COLLECT(

ARRAY[

makepoint(0,0), makepoint(1,1), makepoint(2,2)

]

)); — MULTIPOINT(0 0,1 1,2 2) SELECT ASEWKT(ST_COLLECT(

ARRAY[

null, makepoint(0,0), makepoint(1,1), makepoint(2,2)

]

)); — null SELECT ASEWKT(ST_COLLECT(

ARRAY[

makepoint(0,0), makepoint(1,1), null makepoint(2,2)

]

)); — MULTIPOINT(0 0,1 1)

Change History (3)

comment:1 by chodgson, 13 years ago

Owner: changed from pramsey to chodgson
Status: newassigned

#912 has a patch to fix this. I will test and apply.

comment:2 by chodgson, 13 years ago

Resolution: fixed
Status: assignedclosed

Patch from #912 applied and committed in r7092.

comment:3 by chodgson, 13 years ago

Also applied to trunk in r7093 (previously applied to 1.5 branch).

Note: See TracTickets for help on using tickets.