参考:https://blog.csdn.net/liubl2011/article/details/84079478
select (extract(epoch from cast(t.pgtime as timestamp))-extract(epoch from cast(t.inserttime as timestamp)))/60 as ddd from table_base t -- 实体表 where (extract(epoch from cast(t.pgtime as timestamp))-extract(epoch from cast(t.inserttime as timestamp)))/60 > 120 -- pgtime大于inserttime 120分钟 limit 100;
标签:Postgresql,相减,timestamp,pgtime,cast,epoch,时间,inserttime,extract From: https://www.cnblogs.com/qsds/p/17486191.html