Re: pgsql: Add support for base64url encoding and decoding

From: Erik Rijkers <er(at)xs4all(dot)nl>
To: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Add support for base64url encoding and decoding
Date: 2025-10-02 09:35:23
Message-ID: 88d49e2b-456c-0f49-d911-f284ecfefeb6@xs4all.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Op 9/20/25 om 23:24 schreef Daniel Gustafsson:
> Add support for base64url encoding and decoding
>
> This adds support for base64url encoding and decoding, a base64
> variant which is safe to use in filenames and URLs. base64url
> replaces '+' in the base64 alphabet with '-' and '/' with '_',
> thus making it safe for URL addresses and file systems.
>
> Support for base64url was originally suggested by Przemysław Sztoch.
>
> Author: Florents Tselai <florents(dot)tselai(at)gmail(dot)com>
> Reviewed-by: Aleksander Alekseev <aleksander(at)timescale(dot)com>
> Reviewed-by: David E. Wheeler <david(at)justatheory(dot)com>
> Reviewed-by: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
> Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
> Reviewed-by: Chao Li (Evan) <li(dot)evan(dot)chao(at)gmail(dot)com>
> Discussion: https://postgr.es/m/70f2b6a8-486a-4fdb-a951-84cef35e22ab@sztoch.pl
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/e1d917182c1953b16b32a39ed2fe38e3d0823047
>
> Modified Files
> --------------
> doc/src/sgml/func/func-binarystring.sgml | 19 ++++
> src/backend/utils/adt/encode.c | 157 ++++++++++++++++++++++++++-----
> src/test/regress/expected/strings.out | 150 +++++++++++++++++++++++++++++
> src/test/regress/sql/strings.sql | 54 +++++++++++
> 4 files changed, 359 insertions(+), 21 deletions(-)

Hi,

doc/src/sgml/func/func-binarystring.sgml:
small typo:

The base64url alphabet use should be
The base64url alphabet uses

Thanks,

Erik

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2025-10-02 09:54:00 pgsql: doc: Improve wording for base64url definition
Previous Message Michael Paquier 2025-10-02 08:19:17 Re: pgsql: Minor fixups of test_bitmapset.c

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-10-02 09:53:06 Add stats_reset to pg_stat_all_tables|indexes and related views
Previous Message Hayato Kuroda (Fujitsu) 2025-10-02 09:32:09 RE: Newly created replication slot may be invalidated by checkpoint