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
userstable that tracks when a user is online. You might add a
statuscolumn which can have one of two values:
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.
Sign in or Join to comment or subscribe