I have a table with column of monotonically increasing integers (id
). I need to update column updated_at
(timestamp) to create an increasing series of timestamps, all in the past. The exact step does not matter, as long as the timestamps monotonically increase.
create table temp1 (
id serial not null,
bar varchar(35),
updated_at timestamp
)
;
insert into temp1
(bar)
values
('val1'),
('val2'),
('val3')
;
select * from temp1;
id | bar | updated_at
----+------+------------
1 | val1 | NULL
2 | val2 | NULL
3 | val3 | NULL
(3 rows)