select a.*,b.login_name,b.user_name,c.cat_name from sec.t_post_message a,sec.t_user b,sec.t_comm_cfg c where a.user_id=b.id and a.type_id=c.cat_id and inpool='0' and time_type='1' and abs((EXTRACT(EPOCH from LOCALTIMESTAMP(0))-EXTRACT(EPOCH from cast(a.send_date||' '||a.send_time||':00' as timestamp(0))))/60)<5 原文链接:https://www.f2er.com/postgresql/196293.html