ST_MSize — Returns the M size of a geometry.
float ST_MSize(geometry geom);
Returns the M size of a geometry, computed as ST_MMax(geom) - ST_MMin(geom), or null if the geometry lacks M values.
This function supports 3d and will not drop the z-index.
This method supports Circular Strings and Curves.
Availability: 3.7.0
SELECT ST_MSize('LINESTRING M (1 2 3, 4 6 8)');
st_msize
--------
5