PostgreSQL 19 introduces the UPDATE/DELETE FOR PORTION OF syntax for temporal tables, allowing targeted modifications to a specific time range within a row's history. Previously, updating a temporally-tracked row required manually closing the old range and inserting a new row inside a transaction. With FOR PORTION OF, a single statement handles the range splitting automatically, inserting 'temporal leftover' rows for history outside the targeted bounds. The feature works for both future and past time ranges, enabling retroactive corrections to historical data. Practical SQL examples demonstrate updating and deleting rows within specific date ranges using tstzrange columns.
Sort: