On Sat, Sep 23, 2006 at 11:47:59PM -0600, Michael Fuhr wrote: > FOR i IN 0 .. (1 << (aupper - alower + 1)) - 1 LOOP
To handle empty arrays this should be: FOR i IN 0 .. COALESCE((1 << (aupper - alower + 1)) - 1, 0) LOOP -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq