| From: | Aleksander Alekseev <aleksander(at)tigerdata(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Chengxi Sun <chengxisun92(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
| Subject: | Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions |
| Date: | 2026-03-19 12:18:48 |
| Message-ID: | CAJ7c6TM=xPAwj4AvN6O4qXa7vc5cLGdDZb21ohqKp-cy2TJyWA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
> I might be missing some context here, so I wanted to ask: is this behavior intentional,
> or would it make sense to enforce stricter validation for Base32hex input?
That's intentional - see the discussion above:
"""
[...]
This code checks if the remaining bits of the input data are all zero.
IIUC we don't have a similar check for base64 and base64url. For
instance, the following input data is accepted:
=# select decode('AB', 'base64');
decode
--------
\x00
(1 row)
"""
Also see the documentation in respect of padding.
--
Best regards,
Aleksander Alekseev
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bertrand Drouvot | 2026-03-19 12:25:41 | Re: Adding locks statistics |
| Previous Message | Chengxi Sun | 2026-03-19 12:12:17 | Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions |