1 -- Splits the line at the given point and returns the two parts
2 -- in a multilinestring.
3 CREATE OR REPLACE FUNCTION split_line_on_node(line GEOMETRY, point GEOMETRY)
9 frac := ST_Line_Locate_Point(line, point);
10 RETURN ST_Collect(ST_Line_Substring(line, 0, frac),
11 ST_Line_Substring(line, frac, 1));