From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | "David E(dot) Wheeler" <david(at)justatheory(dot)com> |
Cc: | Florents Tselai <florents(dot)tselai(at)gmail(dot)com>, Aleksander Alekseev <aleksander(at)tigerdata(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Cary Huang <cary(dot)huang(at)highgo(dot)ca>, Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl> |
Subject: | Re: encode/decode support for base64url |
Date: | 2025-07-29 12:25:26 |
Message-ID: | 7409A7D0-CBB7-4311-82E0-AFAB53A8E33C@yesql.se |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 12 Jul 2025, at 21:40, David E. Wheeler <david(at)justatheory(dot)com> wrote:
> Thank you! This looks great. The attached revision makes a a couple of minor changes:
I also had a look at this today and agree that it looks pretty close to being
done, and a feature we IMHO would like to have.
> * I kind of expected pg_base64url_encode to appear immediate after pg_base64_encode. In other words, to see the two uses of pg_base64_encode_internal adjacent to each other. I think that’s more typical of the project standard. Same for the functions that call pg_base64_decode_internal.
+1, done in the attached.
> * There are a few places where variable definition has been changed without changing the meaning, for example:
> ...
> Even if this is desirable, it might make sense to defer pure formatting changes to a separate patch.
Agreed, the attached reverts stylistic changes.
> * You define return variables in functions like pg_base64url_enc_len rather than just returning the outcome of an expression. The latter is what I see in pg_base64_enc_len, so I think would be more consistent.
+1, done in the attached.
The attached version also adds a commit message, tweaks the documentation along
with a few small changes to error message handling etc.
The base64 code this extends is the RFC 2045 variant while base64url is based
on base64 from RFC 3548 (obsoleted by RFC 4648). AFAICT this is not a problem
here but has anyone else verified this?
--
Daniel Gustafsson
Attachment | Content-Type | Size |
---|---|---|
v5-0001-Add-support-for-base64url-encoding-and-decoding.patch | application/octet-stream | 13.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Hayato Kuroda (Fujitsu) | 2025-07-29 12:32:51 | RE: 024_add_drop_pub.pl might fail due to deadlock |
Previous Message | Tom Lane | 2025-07-29 12:11:11 | Re: Regression with large XML data input |