Re: encode/decode support for base64url

Cary Huang <cary.huang@highgo.ca>

From: Cary Huang <cary.huang@highgo.ca>
To: "Florents Tselai" <florents.tselai@gmail.com>
Cc: "Daniel Gustafsson" <daniel@yesql.se>, "Aleksander Alekseev" <aleksander@timescale.com>, "PostgreSQL Hackers" <pgsql-hackers@postgresql.org>, "Przemysław Sztoch" <przemyslaw@sztoch.pl>
Date: 2025-03-10T22:51:06Z
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

> Oh well - you're probably right.
> I guess I was blinded by my convenience.
> Adding a 'base64url' option there is more appropriate.

I agree with it too. It is neater to add "base64url" as a new option for
encode() and decode() SQL functions in encode.c.

In addition, you may also want to add the C versions of base64rul encode
and decode functions to "src/common/base64.c" as new API calls so that
the frontend, backend applications and extensions can also have access
to these base64url conversions. 


Cary Huang
-------------
HighGo Software Inc. (Canada)
cary.huang@highgo.ca
www.highgo.ca