Re: Fix OAuth validator docs for error_detail on internal errors - Mailing list pgsql-hackers

From Chao Li
Subject Re: Fix OAuth validator docs for error_detail on internal errors
Date
Msg-id 28A71A53-EB55-4A29-8C20-BBAF1BC82D2A@gmail.com
Whole thread
In response to Re: Fix OAuth validator docs for error_detail on internal errors  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: Fix OAuth validator docs for error_detail on internal errors
List pgsql-hackers

> On Jun 5, 2026, at 04:19, Daniel Gustafsson <daniel@yesql.se> wrote:
>
>> On 4 Jun 2026, at 14:33, Chao Li <li.evan.chao@gmail.com> wrote:
>
>> “Any result parameters are ignored” is no longer accurate; it should be something like “any result parameters except
result->error_detailare 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
parametersare 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.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/





Attachment

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: dict_synonym.c: fix truncation of multibyte sequence
Next
From: "Tristan Partin"
Date:
Subject: Re: PG19beta1: GCC 16.1.1 warning: ‘actual_arg_types’ may be used uninitialized in clauses.c