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 1vDmlZ-00FweZ-9X for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Oct 2025 16:41:49 +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 1vDmlX-00DwHe-My for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Oct 2025 16:41:46 +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 1vDmlW-00DwHW-OC for pgsql-hackers@lists.postgresql.org; Tue, 28 Oct 2025 16:41:46 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vDmlS-004jCo-35 for pgsql-hackers@postgresql.org; Tue, 28 Oct 2025 16:41:45 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id F40FD7A0069; Tue, 28 Oct 2025 12:41:39 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Tue, 28 Oct 2025 12:41:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1761669699; x=1761756099; bh=SlCO0WCmS2 B9u5GrfUn3/AHfR7xaUNi+pk4wmJQSCvA=; b=Zmvd5QrH/HCbRb+T9geL6vE7zK Eb7DxMMXjmzJ36zw+jgrCbbCLw/KlxHIixNhTPJlcrD9vfXMicnhk2E+u++GQqgy 31QiTE8ZItMjr4RuW8q2/GySo302NmPkaPvwa2BOrBMXyvsNv+nUTqZsTNVIiBxE PqfgnN+AvHCFXXrT/kSLKZpKUWzpZ2oc0dd2jZYde6d3OGNRsZUSh390RUz/MQMl Y2ohYMD4P3AtSnuUcHj7zMN7silmWDd1VCAiOES2ZBsmhZhyf/dLeIutBRp+GrRY dwDQCKaU70VwsBjgDlVTLqp49xnq5idkKwDRQ5EpofzccNBhW+qIdEWgVEpA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1761669699; x=1761756099; bh=SlCO0WCmS2B9u5GrfUn3/AHfR7xaUNi+pk4 wmJQSCvA=; b=w2Nn2PEKCBMfUhNG+ipLnm5P+fs4luGFyYIYd56xaLPIszeq8V+ OmTpgKDORXpdea/mhV7lys3uCruVti/wBUkK40ce+a/5gHkw9dMGnhj8CL8G+70z lkRyhUtm5nKzc/fzJpNu2LSxCZbnihof9cxpWP50V6jARtXIVkPClInYjivFL3Z3 X0MvsGqbNK1B/CQASyI9/OZAw0K/Hq8amcDYg6Bb3hJWSqQW7aNBqMZx18pHDxsh NAE03+KyD7w67Kq4FeqRnmUuQNmXgD8bNKkGlKLGXrfXD3xYLoZPVODMNV/wdaIi 27Vzha5KXbRC46cokI4IIU/3N2Pob3b3dXA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduiedufeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefufhffjgfkfgggtgesmhdtreertderjeenucfhrhhomhepffgrghhfihhn nhcukfhlmhgrrhhiucforghnnhhsnohkvghruceoihhlmhgrrhhisehilhhmrghrihdroh hrgheqnecuggftrfgrthhtvghrnhepvddvhfehtdefkedugfetudefhefggfegjeeijeeh uefgteehgfegtdelgeetteejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrghrihdrohhrghdpnhgspghrtghpthht ohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvg hrshesphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepshgrfigruggrrdhmshhh khesghhmrghilhdrtghomhdprhgtphhtthhopeiggehmmhhmseihrghnuggvgidqthgvrg hmrdhruhdprhgtphhtthhopehsvghrghgvhihprhhokhhhohhrvghnkhhoseihrghhohho rdgtohhmrdgruhdprhgtphhtthhopehpohhsthhgrhgvshesjhgvlhhtvghfrdhnlh X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Oct 2025 12:41:38 -0400 (EDT) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: Jelte Fennema-Nio Cc: Sergey Prokhorenko , Andrey Borodin , Masahiko Sawada , pgsql-hackers Subject: Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions 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> <1154454839.957923.1761604611424@mail.yahoo.com> <87ldkv8cog.fsf@wibble.ilmari.org> Date: Tue, 28 Oct 2025 16:41:37 +0000 In-Reply-To: <87ldkv8cog.fsf@wibble.ilmari.org> ("Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker=22's?= message of "Tue, 28 Oct 2025 11:53:51 +0000") Message-ID: <87ikfz7zcu.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Dagfinn Ilmari Mannsåker writes: > Jelte Fennema-Nio writes: > >> Then combining that with UUID <-> bytea casting (which also >> seems totally reasonable functionality to me), would give you the >> functionality (but not the defaults you want). > > +1 for adding casts. Here's a patch for that. I'm not 100% confident about the error code for invalid length, but that was the closest one I could find in errcodes.txt. I might do the base32hex encode/decode later, unless someone else beats me to it. - ilmari --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Allow-explicit-casting-between-bytea-and-UUID.patch