On Wed, Nov 25, 2026 at 02:48:18PM +0100, Jakub Wartak wrote: > On Wed, Nov 25, 2026 at 3:31 AM Tom Lane <[email protected]> wrote: >> passwordcheck is only intended as sample code, not a production-grade >> check for weak passwords. I'm not sure we want to give people the >> impression that it's good for anything more than that as-is. > > JFYI, I witnessed cases where people asked for adding functionality into > the passwordcheck (even if that was just for CrackLib) purley because of > the fact that it is provided as ready to load extension inside the > distributed packages (and yes docs say "You can adapt this module to your > needs by changing the source code"). > > Wouldn't it be better then to just deprecate it in PG20 release notes and > *not* compile by default (unless somebody enhances it greatly; modern > password rules are kind of like: minN chars + min A upper/lowercase > letters + min B numbers + some symbols).
I think we are in a tricky position when it comes to this module. We claim it's intended as sample code, and approximately half of its documentation is warnings about its limitations, but it's apparently still rather well-used. So we kind of want people to stop using it, but many users will probably be unhappy with removing it. If we're not going to consider improvement requests for it, perhaps we should mark it deprecated but leave it around indefinitely. Else, I think we should be open to adding further configurability. -- nathan
