public inbox for [email protected]
help / color / mirror / Atom feedFrom: Jacob Champion <[email protected]>
To: Daniel Gustafsson <[email protected]>
Cc: Zsolt Parragi <[email protected]>
Cc: Álvaro Herrera <[email protected]>
Cc: Pg Hackers <[email protected]>
Subject: Re: unclear OAuth error message
Date: Fri, 27 Mar 2026 16:20:53 -0700
Message-ID: <CAOYmi+kGkXu5Ep_6yM6J1fgjfxpFVQ1aL44Au2OfU=fU+1vzrA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CAOYmi+kLmjJmtmkKs1mWcmNFsgQWsY8ajRhctsrmeVy-y6OKFw@mail.gmail.com>
<CAOYmi+naxE5os6dSPpVp-=ip=xv_dfmtypOOjzEfreA2KgVPTA@mail.gmail.com>
<CAOYmi+kCD3GmTZMQKC=zXZb10SpVX3FpztUZaqMwZ5BJr-G=tg@mail.gmail.com>
<CAN4CZFOXdgVT-HQQvjQVushcQtiBovcrLz4ohLtkCKXBWgN_VA@mail.gmail.com>
<CAOYmi+mxcvtJ9QJhxd4SbYHk=+L9r3VrK0xJ1DsM+H3pFFUtGg@mail.gmail.com>
<[email protected]>
On Fri, Mar 27, 2026 at 3:24 PM Daniel Gustafsson <[email protected]> wrote:
> > IMO, no. I don't want error_detail to add semantics to the API, just
> > descriptive power. Plus, I think a design that sets a possible error
> > message before entering a complex operation, knowing that it will be
> > ignored on success, is perfectly valid. libpq-oauth, and to a lesser
> > extent libpq, make use of that pattern.
>
> Callsites can also clear the error message on success and not even rely on it
> being ignored.
Agreed, but are you saying that as an argument for my approach, or for Zsolt's?
> + * This string may be either of static duration or palloc'd.
> + */
> + char *error_detail;
>
> I'm not a big fan of "either static or allocated" and prefer if we just require
> one or the other. We have this pattern in other places so it's not a blocker
> for going it, but.
I don't think I can enforce either choice, though: I pass the
error_detail into the ereport(FATAL), so the process is about to go
down, and I'm never going to pfree() it.
--Jacob
view thread (12+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: unclear OAuth error message
In-Reply-To: <CAOYmi+kGkXu5Ep_6yM6J1fgjfxpFVQ1aL44Au2OfU=fU+1vzrA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox