5 ms·
postgres has a version of this preempts idea with default values on columns. postgres will fill in the value at query time without needing to backfill the data.
by cakeface 4y ago
postgres has a version of this preempts idea with default values on columns. postgres will fill in the value at query time without needing to backfill the data. postgres is not a horizontally scalable database like FDB so not a direct comparison. In practice this means the migration lock is much shorter and it becomes possible to actually have a default in large tables.
- hchaudhary 4y agoAllowing default values for columns is definitely doable and we can also implement it in a similar way by filling it in during the query. But changing the type of a field to an incompatible type is tricky and needs more constraints and external machinery to fix the history.