Search Postgresql Archives

Re: powerset?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux