Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
| От | Aleksander Alekseev |
|---|---|
| Тема | Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions |
| Дата | |
| Msg-id | CAJ7c6TOramr1UTLcyB128LWMqita1Y7=arq3KHaU=qikf5yKOQ@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions |
| Список | pgsql-hackers |
Hi Sergey, > I'm writing to propose adding two new built-in functions to PostgreSQL that provide compact UUID encoding using the base32hexformat. Firstly, cc:'ing a few dozens of people is not the best way to get attention to your patch. Please don't do this. Secondly, in order to propose a patch please use `git format-patch` and send it as an attachment. Then register it on the nearest open commitfest [1]. The interface you are proposing is ugly and is not composable. The right way of doing this IMO would be: 1. Implement uuid -> bytea and bytea -> uuid casting 2. Implement encode(bytea, 'base32') and decode(text, 'base32') So the overall interface should be like this: SELECT encode(uuidv7() :: bytea, 'base32'); The value of converting uuid to base32 is not obvious though, so I would recommend explaining it in more detail. Consider starting a new thread for each separate patch. [1]: https://commitfest.postgresql.org/ -- Best regards, Aleksander Alekseev
В списке pgsql-hackers по дате отправления: