May 17, 2026, 11:40 PM

This commit is contained in:
Paweł Domański
2026-05-18 06:40:19 +00:00
commit 64944cf004
896 changed files with 310709 additions and 0 deletions
@@ -0,0 +1,24 @@
-- Rename a user:
postgres=# alter user dbatest rename to dbaprod;
NOTICE: MD5 password cleared because of role rename
ALTER ROLE
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
dbaprod | | {}
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
<< NOTE - AFTER renaming the user, you need to reset the password to same old one.
i.e
-- Change the password a user:
postgres=# alter user dbaprod password 'test';
ALTER ROLE
--- Increase the validity of the user:
postgres=# alter user dbaprod valid until 'Feb 10 2021';
ALTER ROLE