Earlier quoted context omitted.
Works when there is always an active price. Having an explicit end date allows certain rows to be inactive automatically after validity period. Think of seasonal categories/products etc which dont exist after a specific period
You could also make the price column nullable and just insert a row with price null and the date from which there should be no price.
Looking Forward to Postgres 19: It's About Time
21–30 of 44 posts
Re: Looking Forward to Postgres 19: It's About Time
#22Re: Looking Forward to Postgres 19: It's About Time
#23Thank you to everyone here saying they are excited about it. I often hear doubts that anyone wants this. Perhaps that's why vendors have been so slow to add it. And thank you 'bonesmoses for writing about it!
We are still missing system time, but if no one else wants to work on it, I hope to tackle that soon.
I have a lot of other ideas for improvement beyond SQL:2011, too. Here is a talk I gave last month about my personal roadmap:
https://illuminatedcomputing.com/pages/pgconf2026-temporal-r...
I've also been vibecoding a lisp REPL to play with the algebra of temporal relational operators (important for the planner): https://github.com/pjungwir/relsim
That overlaps with my attempt to write implementations for temporal semi/anti/outer-join and other relops: https://github.com/pjungwir/temporal_ops
If anyone has comments about what you'd like to see, I'm happy for feedback!
Re: Looking Forward to Postgres 19: It's About Time
#24Hey I worked on this! Thank you to everyone here saying they are excited about it. I often hear doubts that anyone wants this. Perhaps that's why vendors have been so slow to add it. And thank you 'bonesmoses for writing about it! We are still missing system time, but if no one else wants to work on it, I hope to tackle that soon. I have a lot of other ideas for improvement beyond SQL:2011, too. Here is a talk I gave…
Re: Looking Forward to Postgres 19: It's About Time
#25This is something that is incredibly useful. I built a system like this a while back that also adds versioning to each time period. The use case is this: let’s say you are tracking your state’s sales tax rate. You do not control this and data entry is manual so it is error prone. The rate is updated typically annually but sometimes more frequently. Let’s say for 2026 you have it at 7.25% and you entered that into the…
Re: Looking Forward to Postgres 19: It's About Time
#26This is WAY easier.
Re: Looking Forward to Postgres 19: It's About Time
#27Re: Looking Forward to Postgres 19: It's About Time
#28One thing I'm wondering about is the performance of temporal tables for the common case, when you only query current rows. When you manually version tables, one strategy is to have a second table that contains archived versions. So your main table only has the current rows, avoiding a performance hit for having many versions per entry. Is there a way to do this with temporal tables? For example partitioning between active and old rows?
Re: Looking Forward to Postgres 19: It's About Time
#29Re: Looking Forward to Postgres 19: It's About Time
#30Why are they storing a time period (start and end date) in the first example? Why not just store the date when the price comes into effect? That would make both overlaps and time travel impossible without using any constraints.