文章目录 建表并插入数据 获取下一行时间 阶段累加 添加序号 建表并插入数据 建表语句 create table test1 ( id bigserial not null constraint test1_pk primary key, create_time timestamp default now() ); 插入随机时间 insert into test1(create_time) values (timestamp '2019-01-01' + random() * (timestamp '2019-01-01' - timestamp '2019-12-31')