PostgreSQL jsonb_build_object 能直接聚合几个字段吗?
这种?
select jsonb_agg(jsonb_build_object('xm',xm,'age',age))
结果 [{'xm':"张三",'age':15},{'xm':"李四",'age':16}]