Re: Modelling versioning in Postgres

2021-05-28 Thread Laura Smith
Thanks both for the interesting idea of using tsrange, but also for introducing me to EXCLUDE USING GIST, I had never heard of it before. Have a good weekend ‐‐‐ Original Message ‐‐‐ On Friday, 28 May 2021 14:13, Michael van der Kolff wrote: > One thing you could consider is a range t

Re: Modelling versioning in Postgres

2021-05-28 Thread Michael van der Kolff
One thing you could consider is a range type for your "versionTS" field instead of a single point in time. So that would be: CREATE TABLE objects ( objectID uuid, versionID uuid, validRange tsrange, objectData text, ); See https://www.postgresql.org/docs/12.5/rangetypes.html for more inf