prepare foo3 as select (99 / $1::int) * $2; PREPARE execute foo3(0, null); ERROR: division by zero
If you want the "null combined with anything = null" to always happen before the "divide by zero is wrong" make your query specific like in foo2 above.
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.