Setting valid time when inserting new records?

The docs say: “The valid time columns can be updated and modified at will, but only for new versions of a given record (i.e. a new row sharing the same xt$id in the same table).”

I have existing data in the database, and I need to backfill rows from a Postgres instance going back six years. It sounds like I have to do two txns, one to first insert a row at a known-incorrect “valid time”, and then a second txn to set the valid time to the known-correct value.

It seems to me that it should be possible to set the correct valid time value on the first insert, in a single txn.

Thoughts?

Hey @erichocean you definitely can insert with full control over valid time (both -from and -to) during INSERT (SQL) or put (XTQL).

This wording is really only intended to describe the mechanical notion of previous versions being immutable - we’ll have a think about how to improve that explanation :thinking: