| From: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
|---|---|
| To: | Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> |
| Cc: | Sergey Prokhorenko <sergeyprokhorenko(at)yahoo(dot)com(dot)au>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions |
| Date: | 2025-10-28 16:41:37 |
| Message-ID: | 87ikfz7zcu.fsf@wibble.ilmari.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> writes:
> Jelte Fennema-Nio <postgres(at)jeltef(dot)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
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Allow-explicit-casting-between-bytea-and-UUID.patch | text/x-diff | 4.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2025-10-28 16:42:52 | Re: display hot standby state in psql prompt |
| Previous Message | Fujii Masao | 2025-10-28 16:00:25 | Re: Suggestion to add --continue-client-on-abort option to pgbench |