On 18th of November Tom Lane committed patch by Laurenz Albe which adds very interesting capability: Add a hook to CREATE/ALTER ROLE to allow an external module to check the strength of database passwords, and create a sample implementation of such a hook ...