聚合(待续)

 array_agg:
聚合函数,返回一个array,相当于oracle的wm_concat:

digoal=# select array_agg(fooid) from foo; array_agg ----------------- {4,5,7,6,1,7,8} (1 row)

setof转换为array:

digoal=# select array(select fooid from foo); array ----------------- {4,5,7,6,1,7,8} (1 row)


 

posted @ 2014-05-30 10:34  bielidefeng  阅读(78)  评论(0编辑  收藏  举报