LineString
LINESTRING(18.6435 42.5412,18.8440 42.5453,18.846 42.3994)
WITH j AS (
SELECT
'SRID=4326;POINT(18.8440 42.5453)'::GEOMETRY AS pta,
'SRID=4326;LINESTRING(18.6435 42.5412,18.8440 42.5453,18.846 42.3994)'::GEOMETRY AS line
)
SELECT
ST_AsText(
ST_Split(line,
ST_ClosestPoint(pta,line))) FROM j
GeometryCollection
LineStrings
st_astext
----------------------------------------------------------------------------------------------------------
GEOMETRYCOLLECTION(LINESTRING(18.6435 42.5412,18.844 42.5453),LINESTRING(18.844 42.5453,18.846 42.3994))
(1 Zeile)