I have a small (~10 rows) table called
restrictions in my PostgreSQL database, where values are deleted and inserted on a daily basis.
I would like to have a table called
restrictions_deleted, where every row that is deleted from
restrictions will be stored automatically. Since
restrictions has a serial id, there will be no duplicates.
How do I write such a trigger in PostgreSQL?