Re: encode/decode support for base64url - Mailing list pgsql-hackers

From Florents Tselai
Subject Re: encode/decode support for base64url
Date
Msg-id CA+v5N42+jMReUkx987P3ORKBFXyM1L7qG1sWUyVA-qbFco_v_A@mail.gmail.com
Whole thread Raw
In response to Re: encode/decode support for base64url  (Cary Huang <cary.huang@highgo.ca>)
Responses Re: encode/decode support for base64url
List pgsql-hackers


On Tue, Mar 11, 2025 at 12:51 AM Cary Huang <cary.huang@highgo.ca> wrote:
> 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.

Attaching a v2 with that.  

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.


We could expose this in base64.c - it'll need some more checking 
A few more test cases, especially around padding, are necessary.
I'll come back to this. 
Attachment

pgsql-hackers by date:

Previous
From: Yuki Seino
Date:
Subject: Re: Add “FOR UPDATE NOWAIT” lock details to the log.
Next
From: jian he
Date:
Subject: Re: Emitting JSON to file using COPY TO