pg_savior is a PostgreSQL extension designed to prevent accidental data loss due to non-parameterized DELETE queries without a WHERE clause.
- Detects DELETE queries without a WHERE clause.
- Logs detailed information about detected queries.
- Hooks into the PostgreSQL query execution process.
- Clone the repository.
- Navigate to the repository directory.
- Run
make
to build the extension. - Run
make install
to install the extension.
After installing the extension, you can enable it in your PostgreSQL database with the following command:
CREATE EXTENSION pg_savior;