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.96) (envelope-from ) id 1w3CLB-000zzy-2B for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 12:19:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3CL9-000PrF-1K for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 12:19:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w3CL9-000Pr7-0I for pgsql-hackers@lists.postgresql.org; Thu, 19 Mar 2026 12:19:03 +0000 Received: from mail-oa1-x31.google.com ([2001:4860:4864:20::31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w3CL5-00000000YOL-2osR for pgsql-hackers@postgresql.org; Thu, 19 Mar 2026 12:19:02 +0000 Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-404254ffe8aso621609fac.0 for ; Thu, 19 Mar 2026 05:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773922740; cv=none; d=google.com; s=arc-20240605; b=WJuLKec+FsI0YUWz2liXVQ7RcE3wH33GMsExkGElZogss6nmIByygJPIk+nUSNQM53 JCk11tPRd0wySl+CMDsefVaXHD6skWkNAFWShvtl2KNrhVN4dsPV7hggMQVoJI1haG0R CwFfAEfKqQwCY3NVhBt2wKYKChLyNJLSV7a12akPmRpC5pCBowDphSf6LerJva1g/w2e sYjvhRosvTn/8/Kj1SEfwLZXeNwlgLjKZcKHZtO+EBWeZBfGcA8Lej00OPeghcVJv06+ EAXIxL2NOhyN6aDNdEVpykjEXdKpAfrRcE2YlzT8Yvjgr/t13CiP4FU4tfgbraQlXk0J orZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=TR5pKDgR2TTcfshRRqcxQIIGcedr9733kC7VWVnAhaU=; fh=YyNUVAdWp2pN0HM4ho8dJH+9iZVPRyHmQN7Hj7tZg30=; b=UUESrXDknRXq6ZCY1UMvf3retWzXX3ebl7kW36TMt90pHE7T61Ebe5ZY8oXOgToXa7 Ccv7nxuKq8Z2Ub4YQbprtFXQN2kmHSFuILGtPYx27Fe5XG1OHjjVcQ+i1V/Y2BgwrcZe zeMUi2+d+w4kf/dYxAKdH+zpwfWoSutfviSXmMq9FHYgZneMJvPSjeUWpHr8CaFT+S8J qywcA1q8pCHQUpbuGJIT1s4l3iNA3sFzybOl93i2mUFcr/1sCveeBOhvLxIM8nMo64Om 7D2cRM4Wq9ZWNSHNFttB+llkm7AgwgZrshA6+eQi2QE4c1JOVaXqwzO/gNXt1hSWKRqQ PxsQ==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tigerdata.com; s=google; t=1773922740; x=1774527540; 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=TR5pKDgR2TTcfshRRqcxQIIGcedr9733kC7VWVnAhaU=; b=R3Cq9t+Go9cvwJh4RgPTKsboWTGFv2Ybxvh6EtaNmT1pZfux5HrFaYT058l/eJwlog jjaCN0sSDjva/EivMpIUrNdWfxbe0ZqZHN3fJnjAvMGn1NjNGh3SX5b5taeCpiJ7qtAg xpxs52Wzkxlpp1iHIhb6cunzYYsbuhTa5wexyDfr/+Dh1K6mR7xVRVLow2xGepgN6B+M G6nfal/pJTlsMXV3c8esvS+Un+SFlYzkWkBfcda8xrFD2Del7C5dKq6sHyTWX1vFAuy9 vBRrnf1gm+nVgwijj501KMikhlntYQ/HS9a7EBIlZyndtsfB1+u7nsHFCallfN2vBVV3 i3xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773922740; x=1774527540; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TR5pKDgR2TTcfshRRqcxQIIGcedr9733kC7VWVnAhaU=; b=TY2EyTpRSu7fwA5NfmXs/sLKIl8XWsSN6k3V9+3VHGpRVuwA7l6cf2IqXS6z7ml3u5 u4IWDxhvP4ia3DIF1Woi9EPtupksX2WE/R/Klj4BQDvBKXUBveh8pqRFzicXRAdcBTjM OACGWU/EWI2j9DKrh13aNTXvuydcodEqUgxMveOoVsNzp4bbqyaGqDyxSO5IsV661lM6 Z8fI0YDXqV6NcCQS62KhuoNBf46IvAMC7xGkD/xTgVZ2RmjKwI2YwXlAY/fCwgCeP9lm goQZtYMuI68DE99Wei+lp0qEFnuCJucl3qdbXkMQErfZI6Mh0CYQGXPhb402GWcoJYwD QqVw== X-Gm-Message-State: AOJu0YwgW1t0qK7BuNWqkOfEgtaOjQYre0XkMYG+sVPbdk0kQlGpPVtH 6Q6eF9u8qLkT5AkhcFqagnAmZ3kasJ3+yv0Oy6wel8CcNF2V/ICERLLjJWccFQSwJMTezRO9hN6 KhB+s3yjV3y8pxX1jiO1ImRzhAwKO7pXLjZuyCnnYPtWHD0ML855dvXo= X-Gm-Gg: ATEYQzz7BEwxVEuuwUaWLs2JyzdbwJg4hkBxuWwQUabYr3PZLmtSbooixTSmHwd1DEt pg/02yi/FPcqXqErTfpo6An04HSBQ23nvfzWBOdHR3J9OTr2Q39cWJAX/2AadtrKz7COPguBN/O Tr+4qL/DKhp6iPUsyqEKK9SX87xgLEzpZAK4T7i5+SjrE7QHuRiq0ugniuTthw62gukZh2BebRy 0FRxgPAA6DniZcWTDTo/ph2WQcXRKp7DQKSWLWrIZO3Vc4Gdzd4AOllyro3hqq5aVIbwjiUDB08 8KU1lYd1LJ/bCX7BkhCjKDgihqujimSalTxS1gRVi6WGMFXct0p/GsBSZU8Wny0T5SmLqw== X-Received: by 2002:a05:6870:2dc4:b0:41b:e8a0:8d8a with SMTP id 586e51a60fabf-41befc3846emr2180761fac.4.1773922740121; Thu, 19 Mar 2026 05:19:00 -0700 (PDT) MIME-Version: 1.0 References: <1791665551.452444.1761209220211.ref@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> <1154454839.957923.1761604611424@mail.yahoo.com> <87ldkv8cog.fsf@wibble.ilmari.org> <87ikfz7zcu.fsf@wibble.ilmari.org> <9CB824CC-70DC-4165-AC6A-9664F47209EE@yandex-team.ru> In-Reply-To: From: Aleksander Alekseev Date: Thu, 19 Mar 2026 15:18:48 +0300 X-Gm-Features: AaiRm52aDG6ntkXO93fSBS2hkkVs27p0C1hAayRYdqw_bf3pFXhHs8OEEkKO6Zw Message-ID: Subject: Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions To: pgsql-hackers Cc: Chengxi Sun , Masahiko Sawada , Andrey Borodin , =?UTF-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, > I might be missing some context here, so I wanted to ask: is this behavior intentional, > or would it make sense to enforce stricter validation for Base32hex input? That's intentional - see the discussion above: """ [...] This code checks if the remaining bits of the input data are all zero. IIUC we don't have a similar check for base64 and base64url. For instance, the following input data is accepted: =# select decode('AB', 'base64'); decode -------- \x00 (1 row) """ Also see the documentation in respect of padding. -- Best regards, Aleksander Alekseev