CREATE OR REPLACE FUNCTION ST_MultiSplit(geom Geometry, blades Geometry) RETURNS Geometry AS $$
BEGIN
    FOR i IN 1..ST_NumGeometries(blades)
       LOOP
          geom = ST_Split(geom, ST_GeometryN(blades, i));
       END LOOP;
    RETURN geom;
END;
$$ LANGUAGE plpgsql;
