SupabaseS
Supabase3mo ago
Jacob

How to update the updated_at field automatically

Hey! I'm working with supabase database and I need to create new table with update_at field and that field will be updated automatically on new change. I wondering if there is a better way to enable it rather than that I'll implement complete trigger snippet for that.
I'll probably need it for multiple migrations.
I found that postgresSQL have this modadatetime extension but I'm ensure if it should work out of the box with the latest postgres.
https://www.postgresql.org/docs/current/contrib-spi.html#CONTRIB-SPI-MODDATETIME
PostgreSQL Documentation
F.41. spi — Server Programming Interface features/examples # F.41.1. refint — Functions for Implementing Referential Integrity F.41.2. autoinc — Functions for
Was this page helpful?