Re: Custom oauth validator options

Zsolt Parragi <zsolt.parragi@percona.com>

From: Zsolt Parragi <zsolt.parragi@percona.com>
To: Jacob Champion <jacob.champion@enterprisedb.com>
Cc: Nikolay Shaplov <dhyan@nataraj.su>, Álvaro Herrera <alvherre@kurilemu.de>, VASUKI M <vasukianand0119@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, david.g.johnston@gmail.com, Robert Haas <robertmhaas@gmail.com>, myon@debian.org
Date: 2026-04-06T22:09:27Z
Lists: pgsql-hackers
> I believe this is now a complete patch
> proposal; tear it apart. :D

The patch looks good to me as is, I don't see any real issues with it,
maybe one cosmetic question in the test.

+ if (GetOAuthHBAOption(state, "log"))
+ elog(LOG, "%s", GetOAuthHBAOption(state, "log"));
+

If we treat the test code as an example for real implementations, this
and the other use could cache the option in a local variable instead
of making duplicate calls, following the pattern of the documentation.



Commits

  1. oauth: Allow validators to register custom HBA options

  2. Make LOAD of an already-loaded library into a no-op, instead of attempting