ST_MMax — Returns the M maxima of a geometry.
float ST_MMax(geometry geom);
Returns the M maxima of a geometry, 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.
SELECT ST_MMax('POINT M (1 2 3)');
st_mmax
-------
3