Um zu überprüfen, ob ein Punkt Teil einer mehrzeiligen ist, können Sie so etwas wie
SELECT
/* this will count the number of occurrences of the point in the linestring */
count(
/* this will be NULL if the point is not equal to the n-th point */
CASE WHEN st_pointn(g.geom, n) = st_geomfromtext('POINT(10 0)')
THEN 1
END
) > 0 /* result is TRUE if the point is on the multiline */
FROM (VALUES(st_geomfromtext('LINESTRING(0 0,10 0,10 10)'))) g(geom)
/* this is a table containing all vertex numbers of the linestring */
CROSS JOIN LATERAL generate_series(1, st_numpoints(geom)) n(n);
verwenden