Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Jelte Fennema-Nio <postgres@jeltef.nl>
Cc: Sergey Prokhorenko <sergeyprokhorenko@yahoo.com.au>, Andrey Borodin
<x4mmm@yandex-team.ru>, Masahiko Sawada <sawada.mshk@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-28T16:41:37Z
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
Attachments
- 0001-Allow-explicit-casting-between-bytea-and-UUID.patch (text/x-diff)
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> writes: > Jelte Fennema-Nio <postgres@jeltef.nl> writes: > >> Then combining that with UUID <-> bytea casting (which also >> seems totally reasonable functionality to me), would give you the >> functionality (but not the defaults you want). > > +1 for adding casts. Here's a patch for that. I'm not 100% confident about the error code for invalid length, but that was the closest one I could find in errcodes.txt. I might do the base32hex encode/decode later, unless someone else beats me to it. - ilmari