In other SQL programs a division by zero is solved by transforming the result to NULL. How can I make postgres have the same behaviour without using CASE ? ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend