把一行数据按Json字符串形式返回
select row_to_json( table_code)from table_code
select array_to_json( array_agg(row_to_json(code))) from ( select 子查询)
postgreSql聚合函数row_to_json初使用
原文:http://www.cnblogs.com/langlang-ndx/p/7117772.html