Search Postgresql Archives

powerset?

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

 



Does anybody have a stored proc they'd like to share (preferably pl/ pgsql) that generates the power set of an array? For instance:

select powerset({1,2,3});

....would give 8 rows:

{}
{1}
{2}
{3}
{1,2}
{2,3}
{1,3}
{1,2,3}




[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