Od wersji 12 PostgreSQL domyślnie ustawia wartość dla haseł
password_encryption = scram-sha-256
w związku z tym, każda utworzona rola lub zmiana hasła ustawi nam hasła:
usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd | valuntil | useconfig ------------+----------+-------------+----------+---------+--------------+---------------------------------------------------------------------------------------------------------------------------------------+----------+----------- http | 16385 | f | f | f | f | SCRAM-SHA-256$4096:D1NPKy+ZDiGGF1/E8q5M/g==$kD4aorMJUp046mghWNnZ89TWalFfacTkzGEfBvg98Ps=:27uyFL+eLw0b3SQIMGyxVuwd+SC1/Tgh9ABb9MTLWoE= | | edokumenty | 16384 | f | f | f | f | SCRAM-SHA-256$4096:9Q2v9SU06DQ2bHV/tCu1XA==$GqcL8rcrZN8LLoOByOZarhkxYiIqrsSidC+WPuVAuds=:xpWGbHlcVfkWXLLA6cMGUz8BVGcLj8+KQNLHXJJ0JcM= | | postgres | 10 | t | t | t | t | SCRAM-SHA-256$4096:2gkT6rlhnnvIWi9K5L403Q==$J3bmONbpjLLpsKpIaJG2TnGZzjwRjiRnu2q66PLZy88=:QfVmPeEodOMpxDJz1n6pFB47lWS967v00YoQQaJYqE0= | |
SELECT rolname, rolpassword ~ '^SCRAM-SHA-256\$' AS has_upgraded FROM pg_authid WHERE rolcanlogin;