ST_Azimuth — Returns the angle in radians from the horizontal of the vector defined by pointA and pointB
float ST_Azimuth(
geometry pointA, geometry pointB)
;
Returns the azimuth of the segment defined by the given Point geometries, or NULL if the two points are coincident. Return value is in radians.
The Azimuth is mathematical concept defined as the angle, in this case measured in radian, between a reference plane and a point
Availability: 1.1.0
Azimuth is especially useful in conjunction with ST_Translate for shifting an object along its perpendicular axis. See upgis_lineshift Plpgsqlfunctions PostGIS wiki section for example of this.