Returns the distance between two ST_Geometry values. ST_3DDistance considers z coordinate values, if they exist in the geometries passed to it.
Valid Data Types
To be valid with ST_3DDistance, these shapes must include z coordinates.
Returns a FLOAT value. The distance units are those of the two input geometries.
Returns 0 if the two geometries intersect.
Returns NULL if the ageometry argument is NULL.