How to migrate "as of timestamp" query in PostgreSQL

3.3k Views Asked by At

I want to migrate or write an equivalent query to get the data from table one hr before the current time in PostgreSQL.

oracle query:

select * 
from T_DATA as of timestamp (systimestamp - interval '60' minute);
2

There are 2 best solutions below

1
JustMe On
select * from T_DATA where timestamp_column >= now() - interval '1 hour'
0
s21s On

Since flashback queries are not supported in postgresql, One approach I tried with temporal tables extension.