postgressql数据库timestamp转字符串,包含毫秒级

//秒级
to_char(time,'YYYY-MM-DD hh24:mi:ss')
//毫秒级
to_char(time, 'yyyy-mm-dd hh24:mi:ss.ms')