pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Add support for base64url encoding and decoding
2+ messages / 2 participants
[nested] [flat]

* pgsql: Add support for base64url encoding and decoding
@ 2025-09-20 21:24  Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: Daniel Gustafsson @ 2025-09-20 21:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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.tselai@gmail.com>
Reviewed-by: Aleksander Alekseev <aleksander@timescale.com>
Reviewed-by: David E. Wheeler <david@justatheory.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Chao Li (Evan) <li.evan.chao@gmail.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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql: Add support for base64url encoding and decoding
@ 2025-10-02 09:35  Erik Rijkers <er@xs4all.nl>
  parent: Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Erik Rijkers @ 2025-10-02 09:35 UTC (permalink / raw)
  To: Daniel Gustafsson <dgustafsson@postgresql.org>; PostgreSQL-development <pgsql-hackers@postgresql.org>

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.tselai@gmail.com>
> Reviewed-by: Aleksander Alekseev <aleksander@timescale.com>
> Reviewed-by: David E. Wheeler <david@justatheory.com>
> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
> Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
> Reviewed-by: Chao Li (Evan) <li.evan.chao@gmail.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







^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-10-02 09:35 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-09-20 21:24 pgsql: Add support for base64url encoding and decoding Daniel Gustafsson <dgustafsson@postgresql.org>
2025-10-02 09:35 ` Erik Rijkers <er@xs4all.nl>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox