postgres=# SELECT atan2(1, 0) AS positive_x, postgres-# atan2(-1, 0) AS negative_x, postgres-# atan2(0, 0) AS zero_x, postgres-# pi() / 2 AS pi_over_two; positive_x | negative_x | zero_x | pi_over_two -----------------+------------------+--------+----------------- 1.5707963267949 | -1.5707963267949 | 0 | 1.5707963267949 (1 row) postgres=#