Re: Fix OAuth validator docs for error_detail on internal errors

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Subject: Re: Fix OAuth validator docs for error_detail on internal errors
Date: 2026-06-05 19:31:50
Message-ID: CDBC3C10-0F67-4254-8462-03F8C25E0143@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 5 Jun 2026, at 00:21, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>> On Jun 5, 2026, at 04:19, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>>
>>> On 4 Jun 2026, at 14:33, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>>
>>> “Any result parameters are ignored” is no longer accurate; it should be something like “any result parameters except result->error_detail are ignored”. This patch just makes that tiny doc fix.
>>
>> That's true, but error_detail is explained in detail in the next paragraph so
>> I'm not sure this change is needed.
>
> Agreed. Adding the “exception for result->error_detail” sounds a bit redundant with the next paragraph. But “any result parameters are ignored” also seems to conflict with the next paragraph, so I think we can just delete that part.
>
> ValidatorModuleResult has three fields, so the logic is:
>
> * The first paragraph talks about authorized and authn_id when the validator succeeds.
> * The second paragraph talks about the validator’s return values.
> * The third paragraph talks about result->error_detail when the validator fails.
>
>> Another thing we don't explicitly document which seems more interesting is that
>> authn_id is used even in case of failure if log_connections is enabled. Maybe
>> that deserves a mention?
>
> This is a good point. I added that in v2.

This version looks good to me, the authn_id sentence is a bit long so I might
do some careful rewording before pushing.

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2026-06-05 19:38:41 Re: ci: Add MTEST_SUITES for optional test tailoring
Previous Message Ayush Tiwari 2026-06-05 19:29:18 Re: [PATCH] refint: Avoid reusing cascade UPDATE plans.