Re: encode/decode support for base64url
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Chao Li <li.evan.chao@gmail.com>
Cc: Florents Tselai <florents.tselai@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, "David E. Wheeler" <david@justatheory.com>, Aleksander Alekseev <aleksander@tigerdata.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Cary Huang <cary.huang@highgo.ca>, Przemysław Sztoch <przemyslaw@sztoch.pl>
Date: 2025-09-19T07:39:08Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add support for base64url encoding and decoding
- e1d917182c19 19 (unreleased) landed
> On 19 Sep 2025, at 08:56, Chao Li <li.evan.chao@gmail.com> wrote: >> On Sep 19, 2025, at 14:45, Florents Tselai <florents.tselai@gmail.com> wrote: >>> This is a normal usage that injects sub-strings based on condition. However, PG doesn’t like that, see here: https://www.postgresql.org/docs/devel/nls-programmer.html#NLS-GUIDELINES >> >> Well, that’s a very interesting catch. >> I’ll let a comitter confirm & advise. > > I got to know this because once I reviewed a Tom Lane’s patch, it had the similarly situation, but Tom wrote code like: > > ``` > If (something) > Ereport(“function xxx”) > Else > Ereport(“procedure xxx”) > ``` > > I raised a comment to suggest avoid duplicate code in the way like your code do, and I got a response with “no” and the link. Tom is right (unsurprisingly) here, since "function" and "procedure" are terms which are translated and depending on which is used it may change the sentence structure in the target language. In this case we inject a name which isn't to be translated, and that will instead help the translator since they otherwise need to translate two strings instead of just one (and they can move the %s to position the injected name into the right place according to grammar rules). -- Daniel Gustafsson