PostgreSQL supabase.com

Postgres auditing in 150 lines of SQL  ↦

Where by “auditing” they mean change tracking, not security testing:

Auditing is particularly useful for historical analysis. To demonstrate, imagine you have a users table that tracks when a user is online. You might add a status column which can have one of two values: online and offline. How would you track how long a user is online for throughout an entire month? An auditing system would track every change with timestamps, and so you can measure the difference between each timestamp and sum them up for the entire month.

What really impresses me about the Supabase team is how much they’re leaning in to Postgres’ rich feature set to build high-quality-yet-low-level abstractions for their users. Paul Copplestone emphasized this when we had him on the show back in January.


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00