Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w6GUR-0047ef-0B for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 23:21:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w6GUO-00CvsW-1s for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 23:21:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w6GUO-00CvsG-0w for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 23:21:16 +0000 Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w6GUD-00000001PKW-3U66 for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 23:21:10 +0000 Received: by mail-qv1-xf2c.google.com with SMTP id 6a1803df08f44-89cc797547fso30050236d6.2 for ; Fri, 27 Mar 2026 16:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774653665; cv=none; d=google.com; s=arc-20240605; b=XTmoUfHSQjiF0oOU5Pw4g9wTHhUTJLGcraWbRn/0wm+639hRKNfN2XknjkkrFVjzPb pt1tSzWPDG0FJ/LU/+C4jCq0ERQLlMMpXv3qqdGUgj5ArbnPYZAxhNlV/tATms0PX8PE 5E5GU/BLcRJsq4RNN7E0VgXjtMUxzEMKQ+e/bOE1XFDoVyOpJKxZMqjkDeH5OcbhKBWe 4OsuntJXlC36AfiXXVMXm2DxSYOCdgspWErJWvsmguISCbhmLjq/jF6RM4lQCXDqp3wZ uk32ngYSNoZwELw7/ue9XdFB5hJFO656n4sj7F4K/sCiOz6uNLS+sJwhmjvwHWcivrTD OEqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wPI2HvTSPkiFuaS5yGMVpRd+AxMoL1bWH49dFYb2eN0=; fh=afsm2r3BcgBMQM8MkYFpKOohlf1CYzVfvXgtwGZcHUQ=; b=Apf+8UirsfquczJvgGLJGUaxOgKx3NAsnyzyEXVb/W+tMudUNzFNsofAk2190powIR PKNwnChlcGIiuVDu+nDK/lZzcmKiO+ykM4jMlgDP5r0jBkUe2RBPC4aQLl83q7qYRhtg yrUpZCPZ+IwkaoFS7HBvOBmMRjUAaSL67uqJo3xOFSR5tbjcOPRcSkEyD9qMWrzJw1W3 sxK55030ZDohKBGCEWvIfLiVLqyEIlVQmVLQlcfQ6XfohVQS+Fdz1uEmQJqp1ORVZvBZ ZIS67EwJ++QdHAtcr3RC3tTPfCUkZ6bunqe4MYpw8hbJb1xbJebnKUxfYuIjq+RGDvIr ghKQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1774653665; x=1775258465; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wPI2HvTSPkiFuaS5yGMVpRd+AxMoL1bWH49dFYb2eN0=; b=G8Vs+U2NN2RvKZwTMcsmMkqYHh10JT8RWfyQ4u4faFXEO2b6yvTkeMFEAgGMWTKBvm OAPphJgiw9O2adnNKk+84rWtVuqXvnA6hu5cJXZ7IAuOBNM2zasPlOT/AOYmOZBAlEB8 I00dKXr2TohED02T1GpvPVJRcan8NwjvPw2Q4FNUd5QTa+1rYVSXlczk5q6/QpBi6Wjp OU7HdoPoNOym4yLxeOi+D0j85pDLYqmGU9gdNl58fp7Chgg/48k5I/A89IMOJwHdd9J1 NzVxOCu7Q2TAUIOvPqOvW/FB/QiwdCw7q79ruPOcOAqFgc5lJuZrWRiJBkO6bOd61CDq jnTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774653665; x=1775258465; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wPI2HvTSPkiFuaS5yGMVpRd+AxMoL1bWH49dFYb2eN0=; b=ep8op8TeuJV0OwrE0ShQ8OKNbvk1f0syUF1bAcM2/PE2j7ThhumBHhpDzL8mSZNWMB cDzLDZ+qA0vI1F/1WBLk2zOm4X6F61SJ1RFlhxUH4l2sX7FyL7YoYew3KqshldBgVCpI Y2kxu8gvB5ENxspcOr4lA2pnof1XC+/jdY/lGYObWtnm9Ed2ZO15AGMYB43Ineg9rRMT isOEHJxPCYoLauTEHmBzy9ApvZ0I9bXOeeb6aaMS4u4hRP+Uu9yYfRtr8hC2RAhrTGyJ LAHZS+rJvdeRdzmidMYO9IyVqTa3jpxnH0C6/PWwYEP0z/KRCz0b+zEls7MKZFF5pOF5 eOyw== X-Forwarded-Encrypted: i=1; AJvYcCUkCnCdhx8hNEOJJk2cg6+5hbsXessINdbHSxn3RJnE5GyTnWFndnfKFm2Lt0juxcmn+X2OACp+Cf3w9+Qs@lists.postgresql.org X-Gm-Message-State: AOJu0YxCzDVpV8+yM1XfzdkSt8otr+UPJMfUWOiTcf+GIG7/NVWVYONM cvaLYXdGzlfs2pme/lW3C3Rvv6Ls0m6Tg04931Gt8ymY+PE2H/96Md22b3G65LR9q2Zkx8oUm/F AEtyM+6Sq3fEVUZRffPE+NIG9VfyRSx+rGOOy7nna X-Gm-Gg: ATEYQzySKe69e3SRXjmZb1IRAB6fCcJFzo3yLJMgoZKHIiesVfdoMcDBsFxo3RX/O6I OE4r78WCY083+6CUbM8f7fhAVofGKG7Pe+atkdEdlsYZP6bIycGpvLIoXlyphOLR4CQSr9lY1la GK1bbqoH6IeyytA2cBXZY1CcJR59qRh8WflsQZaqYBFY4tZAuAn+eMSjGYG3EXOvUOdkYaSPaCo 5ptnJnNO3fv8sNE2GMjeRZG+u1KUT7iX2ac4VUD9pmXCU2M5dzNWP4LWTTu935xsZINFniHoLOp ensdQgcytw== X-Received: by 2002:a05:6214:c2c:b0:89c:5557:88ca with SMTP id 6a1803df08f44-89ce8d76500mr64812156d6.14.1774653664862; Fri, 27 Mar 2026 16:21:04 -0700 (PDT) MIME-Version: 1.0 References: <202601241015.y5uvxd7oxnfs@alvherre.pgsql> In-Reply-To: From: Jacob Champion Date: Fri, 27 Mar 2026 16:20:53 -0700 X-Gm-Features: AQROBzB2XQRNgE5lssiznFbrlNtiG46hNp_spDi_Z4iVjgSYRaD8SWrL4O3tyM8 Message-ID: Subject: Re: unclear OAuth error message To: Daniel Gustafsson Cc: Zsolt Parragi , =?UTF-8?Q?=C3=81lvaro_Herrera?= , Pg Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 27, 2026 at 3:24=E2=80=AFPM Daniel Gustafsson = 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 o= n it > being ignored. Agreed, but are you saying that as an argument for my approach, or for Zsol= t'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 r= equire > one or the other. We have this pattern in other places so it's not a blo= cker > 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