DROP TABLE IF EXISTS network;
CREATE TABLE network AS 
SELECT * FROM (
   SELECT ne.gid, ne.id, ne.highway, ne.maxspeed, ne.name, ne.oneway, ne.surface, ne.ref, ne.lanes, ne.bridge, ne.junction, ne.cycleway, ne.access, ne.tunnel, ne.foot, ne.level, ne.maxheight, ne.horse, (ST_Dump(ST_MultiSplit(ne.geom, (
      SELECT ST_Union(no.geom) FROM nodes no WHERE ST_intersects(no.geom,ne.geom)
)))).geom geom FROM network2clean ne) a;

DROP TABLE network2clean;
