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 1w3ETs-0011y7-1c for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 14:36:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3ETr-000NXt-01 for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 14:36:11 +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 1w3ETq-000NXl-0j for pgsql-hackers@lists.postgresql.org; Thu, 19 Mar 2026 14:36:11 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w3ETo-000000000rv-0umB for pgsql-hackers@postgresql.org; Thu, 19 Mar 2026 14:36:09 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id D4621EC0179; Thu, 19 Mar 2026 10:36:06 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 19 Mar 2026 10:36:06 -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=fm3; t=1773930966; x=1774017366; bh=yOQk6JdoaS wdBkxdzz3O50m7jbSxvOMp/iTOXF67fxc=; b=ZNlb1MYjiyjGpVbw5IAMPrp7Sr m3MtDfzM0egH8/qYUJGBye2UW4wQNrZ6l0s0XJ3G1hS6qiOBcwVIHljO6M8rRilh PpM+Rt2jlUu3AgRop/gCmU9tc47hbEQaDOHKa/xWdB8fXSsf2V7P4J7AHfbS4ebx hWmtqU9ZDXrVucdB5X6QBWVzJd1Ey5w5EFfV2BJoJ5jBLHYeqUO0u0ANA5G8DkDP OpQMzn/Umwhr6zly6pPPlujxoSVjEv6dVUPvsemkOMptyZhZLhO3Ynpcu+rmM9Nd PId7tW6N3UqEInrUbu6hTOoM882Zic5Lp0fpdf1+ZP84pYZgQbytQFqNxbig== 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=fm1; t= 1773930966; x=1774017366; bh=yOQk6JdoaSwdBkxdzz3O50m7jbSxvOMp/iT OXF67fxc=; b=JWhd5G+VEUS8VR+fAjI4wCtTeL1GcfhtOIU60vaj5Mg1IPclQKh KOaV22nUf4GMf6/m03okjMgQPX1tzQ91WEBBaWw3ccctZ3u+3RLLs5MTPyrtGtn7 t6Lx38jeUCyJ4b+tbBWyGaVShHIQQpCapUR+1EMDXaglxBswMkjSAb9GzU8xoBIc nyEPaASk9Mb1KJ073ahtfXBPjZ4sQ++E0gXWkfQjEUTzcaFkNSj3TATk2bKbgdwj nuYfJA0DTdbxcgfzyZ8KSNqjcEKDLn98oHL/Q5Aky6R7ecswOKv1mrUKAT49E8X6 uspaWRsD4doNaUnd+TIyCZ62xpc+lTmFCPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeftdejvdejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefufhffjgfkfgggtgesthdtredttderjeenucfhrhhomhepffgrghhfihhn nhcukfhlmhgrrhhiucforghnnhhsnohkvghruceoihhlmhgrrhhisehilhhmrghrihdroh hrgheqnecuggftrfgrthhtvghrnhepkeeljeeufefhffekhfektdefleeuvdeiiefhheef feefgeegudffudehjeejiefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrghrihdrohhrghdpnhgspghrtghpthht ohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgiegmhhmmheshigrnhguvg igqdhtvggrmhdrrhhupdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshht ghhrvghsqhhlrdhorhhgpdhrtghpthhtoheprghlvghkshgrnhguvghrsehtihhgvghrug grthgrrdgtohhmpdhrtghpthhtohepshgrfigruggrrdhmshhhkhesghhmrghilhdrtgho mh X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Mar 2026 10:36:05 -0400 (EDT) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: Masahiko Sawada Cc: Aleksander Alekseev , pgsql-hackers , Andrey Borodin Subject: Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions References: <1791665551.452444.1761209220211.ref@mail.yahoo.com> <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> Date: Thu, 19 Mar 2026 14:36:04 +0000 In-Reply-To: (Masahiko Sawada's message of "Wed, 18 Mar 2026 10:52:30 -0700") Message-ID: <878qbn51kb.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Masahiko Sawada writes: > I've made some minor changes to both patches (e.g., rewording the > documentation changes and commit messages etc), and attached the > updated patches. > > I'm going to push these patches unless there is no further comment. Just one minor nitpick on my patch, which is that it should use palloc_object(), which I wasn't aware of when I wrote it originally. > diff --git a/src/backend/utils/adt/bytea.c b/src/backend/utils/adt/bytea.c > index fd7662d41ee..4dc83671aa5 100644 > --- a/src/backend/utils/adt/bytea.c > +++ b/src/backend/utils/adt/bytea.c [...] > + if (len != UUID_LEN) > + ereport(ERROR, > + (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), > + errmsg("invalid input length for type %s", "uuid"), > + errdetail("Expected %d bytes, got %d.", UUID_LEN, len))); > + > + uuid = (pg_uuid_t *) palloc(sizeof(pg_uuid_t)); this should be: + uuid = palloc_object(pg_uuid_t); > + memcpy(uuid->data, VARDATA_ANY(v), UUID_LEN); > + PG_RETURN_UUID_P(uuid); > +} > + - ilmari