Test the extension (using pg_regress)
A few things to test:
- test if
recall_disable() restores the previous state of the DB
- check if
ALTER TABLE statements work as expected (+ check if it breaks inserts into the log table as schema changes might create a disparity between data and log table)
- a stress test with a reasonable amount of data
- see if table/column name escaping works properly
- check if updating the primary key works as expected (mark the old log entry deleted, create a new one)
- ...
Done:
- the simplest case:
recall_enable() and a few INSERT/UPDATE/DELETEs (with a few checks if the log table contains the right data).
- test
recall_clean()
- unconditional
UPDATE (i.e. one without a WHERE clause; effectively updating all rows at once)
- intentionally trigger the
now() issue
Test the extension (using
pg_regress)A few things to test:
recall_disable()restores the previous state of the DBALTER TABLEstatements work as expected (+ check if it breaks inserts into the log table as schema changes might create a disparity between data and log table)Done:
recall_enable()and a few INSERT/UPDATE/DELETEs (with a few checks if the log table contains the right data).recall_clean()UPDATE(i.e. one without aWHEREclause; effectively updating all rows at once)now()issue