Comment Comment by DaiPlusPlus Better idea: just install the Postgres extension that enables ISO SQL Temporal Tables, just like what MSSQL and MariaDB have had for 8 years now: https://pgxn.org/dist/temporal_tables/ parent DaiPlusPlus 3 years ago