On 9/11/07, Alban Hertroys <alban@xxxxxxxxxxxxxxxxx> wrote: > I would have expected an avg of 2.0 and a sum of 4, where am I going wrong? This works for me: select avg(a) from explode_array(array[1, 3]) a; avg -------------------- 2.0000000000000000 (1 row) ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend