1.string_agg.字段拼接在一起
select string_agg(role_id, ',') from portal_role
2.字符串分隔成table
select regexp_split_to_table('1,2,3', ',')
3.字符串分隔成数组
select regexp_split_to_array('1,2,3', ',')
1.string_agg.字段拼接在一起
select string_agg(role_id, ',') from portal_role
2.字符串分隔成table
select regexp_split_to_table('1,2,3', ',')
3.字符串分隔成数组
select regexp_split_to_array('1,2,3', ',')