On Thu, Feb 26, 2026 at 3:36 PM Andreas Karlsson <andreas@proxel.se> wrote:
> - https://github.com/ged/ruby-pg/pull/693
> - https://github.com/ged/ruby-pg/pull/700
Related, but a bit tangential: neither proposal there implements
cooperative use of the authdata hook, which is going to make your
problems worse. In particular,
> /* TODO: a hook can return 1, 0 or -1 */
is wrong. Zero is reserved for the implementation [1]; you want to
defer to the next link in the chain instead. It's up to the top-level
application (or else, something with *sole* threadsafe control of
libpq) to decide what that chain looks like.
--Jacob
[1] https://www.postgresql.org/docs/current/libpq-oauth.html#LIBPQ-PQSETAUTHDATAHOOK