On 6/4/21 1:32 PM, Laura Smith wrote:
What is the solution then ? I need to keep historical versions but at the same time I need a "current" version. If I am not able to use "infinity" as bounds for "current" version then clearly I'm wasting my time trying to use EXCLUDE AS for version tracking because clearly using fixed timestamps instead of "infinity" for tstzrange would be a hacky fix that will be fragile and prone to breakage.
This is not exactly the same thing you are trying to do (I think), but maybe you can get some useful ideas from this:
https://www.joeconway.com/presentations/RLS_TimeTravel-FOSDEM2019.pdf HTH, Joe -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development