FROM (SELECT (ST_Dump(ageom)).geom) as f
WHERE NOT ST_IsEmpty(geom)
LOOP
- -- NOTE: storing this as a constant
- -- because the CASE WHEN in PostgreSQL 10 refuses to short-circuit
- -- when CASE contains set returning functions and the CASE boolean is not a constant
- -- TODO: this feels a little dirty to assume so may need a revisit in near future
- var_dims = rec.dims;
+ -- NOTE: storing this as a constant
+ -- because the CASE WHEN in PostgreSQL 10 refuses to short-circuit
+ -- when CASE contains set returning functions and the CASE boolean is not a constant
+ -- TODO: this feels a little dirty to assume so may need a revisit in near future
+ var_dims = rec.dims;
FOR rec2 IN SELECT CASE var_dims
WHEN 0 THEN
topology.topogeo_addPoint(atopology, rec.geom, tolerance)