Skip to content

Instantly share code, notes, and snippets.

View juancampa's full-sized avatar
🏠
Working from home

Juan Campa juancampa

🏠
Working from home
View GitHub Profile
@slotrans
slotrans / history_stuff.sql
Created August 6, 2021 23:50
Building blocks for generic history-keeping in Postgres.
/*
Replace "your_schema" with whatever schema is appropriate in your environment.
It is possible to use "public"... but you shouldn't!
*/
/*
Function to stamp a "modified" timestamp. Adjust the name to suit your environment,
but that name is hard-coded so it is assumed that you only use _one_ such name.