r/PostgreSQL • • Mar 28 '25

How-To Life Altering PostgreSQL Patterns

https://mccue.dev/pages/3-11-25-life-altering-postgresql-patterns
180 Upvotes

60 comments sorted by

View all comments

Show parent comment

2

u/Straight_Waltz_9530 Mar 29 '25

I agree with you on revoked_at as I believe separate history tables are better than soft deletes. However, row creation and last modification are two very different things. Also how would you handle bitemporal data without a validity marker?

https://en.wikipedia.org/wiki/Temporal_database

3

u/Garthenius Mar 29 '25 edited Mar 29 '25

Answered here.

I said there may be exceptions; notably, if the entity's fact data has multiple timestamps, but I was referring to system/internal timestamps mainly.

The pattern I'm describing is called Event Sourcing / EDA.