Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
| От | Masahiko Sawada | 
|---|---|
| Тема | Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions | 
| Дата | |
| Msg-id | CAD21AoCKvYCccndY4CRcwk1bOuWxJionOidEtKQWoJTqS7wL1g@mail.gmail.com обсуждение исходный текст  | 
		
| Ответ на | Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions (Andrey Borodin <x4mmm@yandex-team.ru>) | 
| Ответы | 
                	
            		Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
            		
            		 | 
		
| Список | pgsql-hackers | 
On Sat, Oct 25, 2025 at 11:07 AM Andrey Borodin <x4mmm@yandex-team.ru> wrote: > > > > > 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. > > 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... Thank you for drafting the patch! But I find it potentially confusing to have different encoding methods for bytea and UUID types. I don't see a compelling reason why the core should support base32hex exclusively for the UUID data type, nor why base32hex should be the only encoding method that the core provides for UUIDs (while we can use it by default). If we implement uuid_encode() and uuid_decode(), we might end up creating similar encoding and decoding functions for other data types as well, which doesn't seem like the best approach. I still believe that extending the existing encode() and decode() functions is a better starting point. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: