1、select EXTRACT(EPOCH FROM (now() - fg_last_retrive_time)) as diff,fg_last_retrive_status from tg_reader where fg_reader_ip ='128.31.188.46' ;
2、select date_part('epoch',(now() - fg_last_retrive_time),fg_last_retrive_status from tg_reader where fg_reader_ip ='128.31.188.46' ;
原文链接:https://www.f2er.com/postgresql/195559.html