Re: encode/decode support for base64url

pavel seleznev <pavel.seleznev@gmail.com>

From: Pavel Seleznev <pavel.seleznev@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Cc: Florents Tselai <florents.tselai@gmail.com>
Date: 2025-05-06T08:48:36Z
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 →
  1. Add support for base64url encoding and decoding

Hi,

In the strings.sql file there is such code
SELECT encode('\x69b73eff', 'base64'); -- Expected: abc+/w==

In the strings.out file
+SELECT encode('\x69b73eff', 'base64'); -- Expected: abc+/w==
+ encode
+----------
+ abc+/w==
+(1 row)
+

maybe you should remove the additional description of the expected value in this way?

strings.sql
SELECT encode('\x69b73eff', 'base64') = "abc+/w=="

strings.out
SELECT encode('\x69b73eff', 'base64') = "abc+/w=="
----------
t
(1 row)

Regards,
Pavel