秒 ==> 日期(‘yyyymmdd’)
select to_char((timestamp with time zone 'epoch'+绝对秒数 * interval '1 second'),'yyyymmdd');
或
select round(extract(epoch from current_timestamp::timestamp with time zone));
日期 ==> 秒
select extract(epoch from current_date);
select to_char((timestamp with time zone 'epoch'+绝对秒数 * interval '1 second'),'yyyymmdd');
或
select round(extract(epoch from current_timestamp::timestamp with time zone));
select extract(epoch from current_date);