On Sat, Oct 25, 2025 at 11:07 AM Andrey Borodin <[email protected]> wrote: > > > > > On 25 Oct 2025, at 04:31, Masahiko Sawada <[email protected]> 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
