Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
Sergey Prokhorenko <sergeyprokhorenko@yahoo.com.au>
From: Sergey Prokhorenko <sergeyprokhorenko@yahoo.com.au>
To: Masahiko Sawada <sawada.mshk@gmail.com>, Andrey Borodin <x4mmm@yandex-team.ru>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-25T19:15:48Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add base32hex support to encode() and decode() functions.
- 497c1170cb10 19 (unreleased) landed
-
Allow explicit casting between bytea and uuid.
- ba21f5bf8aff 19 (unreleased) landed
-
Add support for base64url encoding and decoding
- e1d917182c19 19 (unreleased) cited
> On 25 Oct 2025, at 04:31, Masahiko Sawada <sawada.mshk@gmail.com> wrote:> > Or providing > 'uuid_encode(uuid, format text) -> text' and 'uuid_decode(text, format > text) -> uuid' might make sense too, but I'm not sure. > On Saturday 25 October 2025 at 09:07:39 pm GMT+3, Andrey Borodin <x4mmm@yandex-team.ru> wrote: > I like the idea, so I drafted a prototype for discussion. > Though I do not see what else methods should be provided along with added one... > Best regards, Andrey Borodin. If base32hex becomes the default string representation for UUIDs in PostgreSQL, then the canonical UUID string representation may be added into these functions for backward compatibility. Best regards, Sergey Prokhorenko