id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 3485,ST_ClusterKMeans garden crash - not empty geometry safe,robe,pramsey," {{{ SELECT ST_ClusterKMeans(foo1.the_geom, 3)OVER() As result FROM ((SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom UNION ALL SELECT ST_GeomFromText('MULTIPOINT EMPTY',4326) As the_geom UNION ALL SELECT ST_GeomFromText('MULTIPOLYGON EMPTY',4326) As the_geom UNION ALL SELECT ST_GeomFromText('LINESTRING EMPTY',4326) As the_geom UNION ALL SELECT ST_GeomFromText('MULTILINESTRING EMPTY',4326) As the_geom ) ) As foo1 LIMIT 3; }}} Do this and server hits the sac. Simplified also crashes {{{ SELECT ST_ClusterKMeans(foo1.the_geom, 1)OVER() As result FROM (SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom) As foo1; }}} ",defect,closed,blocker,PostGIS 2.3.0,postgis,master,fixed,,