Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vDKO9-006z71-OM for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Oct 2025 10:23:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vDKO8-007FC8-OP for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Oct 2025 10:23:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vDKO8-007FC0-Dx for pgsql-hackers@lists.postgresql.org; Mon, 27 Oct 2025 10:23:43 +0000 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vDKO4-004TUm-2j for pgsql-hackers@postgresql.org; Mon, 27 Oct 2025 10:23:43 +0000 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-3c97813e788so2633809fac.0 for ; Mon, 27 Oct 2025 03:23:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tigerdata.com; s=google; t=1761560618; x=1762165418; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gDgqd9/+DQt63oSidXpK2Lh0WTRNPNzvPgEK50Gvnq0=; b=AxVejbX/hbRAiG7VV1R4qifYmEyMD8J5mFjj0LvTY/IoLCokYQgoVvx9fMtEZnbQHG qdBkOCtJ1ouBaU5BOHP2YWo693+cIlGosxFcmbIpkjeEzOxmIzpmCVwZrlVFGyXpZLjY tp0wi/H12VH2D0oIDJQAuFcDk3VizWZ0ICHf2gbSEvzy808Ki6JPgTjusBX81MIbhE+i UxhhYVHIpwIxBLhKaPPphJqND2wt5ObQb34tzU2JVuHophwyYVdaOEaN+QjLtvkw7xtb w0/hJAY/PYn/TnjIz/X+kG0Mo1tT7hmOm8XBkva1RGCT+p393CM48X1DVO5zSZOi1EUf YWcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761560618; x=1762165418; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gDgqd9/+DQt63oSidXpK2Lh0WTRNPNzvPgEK50Gvnq0=; b=ThNMsahv5xAqkWnZckJS1S3tUP7huF8c+i5sMsMby1eqtqfBxrS2c5MoADxQggoguf 2eqPULyI09FcKZ4eyBsOwM5iOKYOdfLOx+prVaUgjAGpCacZSex3n2CISEr5u2M7DRmz UjZ6c3OHIwLljDRb4l34qwqWouuXbNCiHgVI26D7Zx3IMlFSjec1XRrWb3yE7WbTZg7/ whYtJzwp6/Df9OZqvShXl23iwN6eTngstmZhexuHbuhA6WE12eMYSwuM3shi6BSaA783 nWNoN+OsZ9SB4ZvLFS1g2BOGtTR52oetVK69VX65LxGuKUSxL/j7zQ7XLa/WpW58fqUK a5Bg== X-Gm-Message-State: AOJu0Yxfete6lUnNwPr6CB2ivVSBNspLnxxxMRgDJe5RARbH/lNVPokD ezOd3DViEvs/b2zyzadb0cA5nYz11v0+i6PO4C+XNrLCkExTL3rjAdJW1PIGAZbvE3wU7D1iF1d c+PuYAGteXnLInS2c28PwXrHwDxxZ5QccckGCdTnwBVgLloNaxq0L3l7ilg== X-Gm-Gg: ASbGncu5GwqdXL5wsB11SiE3Gpoh90tbItZvz/BWDB2u0hjsfCAjO6TUZaRxBfo6ur4 I637ELjJkpkb1uDYF3CG3DyVuzcx2B7x54rnozxeF3dg9qpMNUm9iM72Z11L+BMkxJjZfhT5SjO n6yNDrZXqSxfTxPndPWXJ2uGXj7UOcfGAZNLY4KmM6QduUDeDpTlyBVgJ0ao+bkRgH9mAFO+HST liw6H8+f/LupmCIUCjLsUclbPLsfg1RNLnQlo345JTEbdRzhjcMh8EQ4K+C6GU0sS2QbMHJ X-Google-Smtp-Source: AGHT+IH/IgBy7FoiELwG8HVMZtKWnCCIU6PGU17SsK3e8ZsWOLXjSOtskSKmdKKaCrhIGwVSQPY+6WAqblaikejDasQ= X-Received: by 2002:a05:6871:285:b0:370:49f7:afad with SMTP id 586e51a60fabf-3c98cfce894mr16086212fac.22.1761560618390; Mon, 27 Oct 2025 03:23:38 -0700 (PDT) MIME-Version: 1.0 References: <1791665551.452444.1761209220211.ref@mail.yahoo.com> <1791665551.452444.1761209220211@mail.yahoo.com> <18022523-0F8F-4C07-AFF5-57DC9086D78E@yandex-team.ru> <1895971769.8343.1761240853939@mail.yahoo.com> <574624399.175025.1761290201491@mail.yahoo.com> <953203149.383019.1761345585325@mail.yahoo.com> <6F76FA61-E2DC-44EF-9504-889D9BDB4EBD@yandex-team.ru> In-Reply-To: <6F76FA61-E2DC-44EF-9504-889D9BDB4EBD@yandex-team.ru> From: Aleksander Alekseev Date: Mon, 27 Oct 2025 13:23:27 +0300 X-Gm-Features: AWmQ_bnL-UHS8veD5dZAK-gWLHpa4qRtioV39ajlAtfpI4D9TPQVhJtSSi0PAWA Message-ID: Subject: Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions To: pgsql-hackers Cc: Andrey Borodin , Masahiko Sawada , Sergey Prokhorenko Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, > > 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... I see no reason why we should forbid the use of base32 encoding with bytea. Or have different functions for this e.g. uuid_encode() and encode(). To me it looks like a poor API design. -- Best regards, Aleksander Alekseev