Hi Legrand & Bruce,


Thanks for your  thoughts. I think MariaDB's temporal queries could work. 


If I want to use it in PostgreSQL, I could use Logical Decoding plugins for recording all INSERT/UPDATE/DELETE history of each table:

- https://debezium.io/docs/install/postgres-plugins/

- wal2json


Do you think PostgreSQL's wal2json already implemented the feature I want?