Skip to content

Commit

Permalink
Add reset function
Browse files Browse the repository at this point in the history
  • Loading branch information
rjuju committed Jul 21, 2015
1 parent d7dd7b9 commit 42aa241
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,7 @@ postgres=# SELECT * FROM pg_reboot;
2015-01-25 00:39:43.609195+01
(1 row)
```

Please also note that all the history will be saved in a pg\_dump / pg\_dumpall
backup. If you need the clear this history, the function
**pg\_track\_settings\_reset()** will do that for you.
13 changes: 13 additions & 0 deletions pg_track_settings--1.0.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,16 @@ BEGIN
END;
$_$
LANGUAGE plpgsql;

CREATE OR REPLACE FUNCTION pg_track_settings_reset()
RETURNS void AS
$_$
BEGIN
TRUNCATE pg_track_settings_list;
TRUNCATE pg_track_settings_history;
TRUNCATE pg_track_db_role_settings_list;
TRUNCATE pg_track_db_role_settings_history;
TRUNCATE pg_reboot;
END;
$_$
LANGUAGE plpgsql;

0 comments on commit 42aa241

Please sign in to comment.