From 8c6dd8a56b8fbe24e6c35ec8948978bd3c5b0524 Mon Sep 17 00:00:00 2001 From: dodger Date: Thu, 20 Jan 2022 10:39:45 +0100 Subject: [PATCH] changed README Initial documentation. --- README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 72b77ea..bfd2e06 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,28 @@ -# postgresql_passchanger_function +# PostgreSQL expiration date management functions + +## Description + +This project tries to find a way to allow users the management of the `VALID UNTIL` expiration clause by themself. +All without granting `super` permissions and having a histoc of changes on a _pseudo-audit_ table + +## Instructions + +### First deploy +Deploy `passchanger.sql` on the desired cluster/database. + +It will: + * create a `dba` schema + * create a `dba` role + * Grant the minimum permissions for this new role so the whole thing works + * Create the 2 needed functions and grant permissions on them to `dba` + + +### Allowing users to use that functions +Take the file `grants_to_grant.sql` and modify the username _dodger_ so it match the username that should have the permissions. +Execute the grants on the cluster/database you have deployed `passchanger.sql` + + +### Changint password & extending expiration date + -Have a look at the comments