postgres passwordcheck library에 대한 내용 공유드립니다.
#postgresql.conf에 library 등록
shared_preload_libraries = '$libdir/passwordcheck'
user 패스워드 설정
postgres=# alter user test login password '123443dd';
#password 8자이상
postgres=# create user test login password 'asdcdf';
ERROR: password is too short
#숫자와 문자 혼용
postgres=# create user test login password 'abcdefgg';
ERROR: password must contain both letters and nonletters
#user와 동일한 암호 불가
postgres=# create user king1234 login password 'king1234';
ERROR: password must not contain user name