ST_LineFromMultiPoint — Creates a LineString from a MultiPoint geometry.
geometry ST_LineFromMultiPoint(geometry  aMultiPoint);
Creates a LineString from a MultiPoint geometry.
Use ST_MakeLine to create lines from Point or LineString inputs.
            
            This function supports 3d and will not drop the z-index.