Outdated comment on scram_build_secret

Matheus Alcantara <matheusssilv97@gmail.com>

From: Matheus Alcantara <matheusssilv97@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-12-09T23:39:03Z
Lists: pgsql-hackers

Attachments

Hi,

The documentation for the iterations parameter on scram_build_secret say:
  * If iterations is 0, default number of iterations is used.

But the body of the function have the following assert
	Assert(iterations > 0);

Commit b577743000 introduced the assert and remove the if condition. 
All usages of this function is using an iteration > 0, so I think that 
is just a matter of updating the documentation? If that's the case the 
attached patch does that.

-- 
Matheus Alcantara
EDB: https://www.enterprisedb.com

Commits

  1. Fix outdated comment of scram_build_secret()

  2. Make SCRAM iteration count configurable