Add support for base64url encoding and decoding
Daniel Gustafsson <dgustafsson@postgresql.org>
Author:
Daniel Gustafsson <dgustafsson@postgresql.org>
Date: 2025-09-20T21:19:32Z
Releases:
19 (unreleased)
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func/func-binarystring.sgml | modified | +19 −0 |
| src/backend/utils/adt/encode.c | modified | +136 −21 |
| src/test/regress/expected/strings.out | modified | +150 −0 |
| src/test/regress/sql/strings.sql | modified | +54 −0 |
Discussion
- encode/decode support for base64url 38 messages · 2025-03-04 → 2025-09-20