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 1w5R51-003FV4-3A for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 16:27:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5R50-00FATF-1T for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 16:27:38 +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 1w5R50-00FASs-02 for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2026 16:27:38 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5R4y-00000000zqN-2nU1 for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2026 16:27:37 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1F90814001A7; Wed, 25 Mar 2026 12:27:36 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Wed, 25 Mar 2026 12:27:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding: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=1774456056; x=1774542456; bh=TY9jqHYFMwOcMQ2IYaEX+53FcHDseBVU fEDoWckrSvg=; b=Yvtb/nFLS3KMZeC4Y5bPlJG6R68Noe7m2WX4PTe2f0LGMx71 GnqRo+0eI4305Mba4uaSKK1AP/kLPta1njz0WouFRvNKg7UUpkbLdpw3FItpyE4f sK68VGLTwqz69yGqcR08Ka54uXSRWLiGswdc7SZ1P7Uo+EKSCw4RWQY4eERBA/W7 46g4JmoeYDV5jMoZ7pxbd0mCST2GSgici1guPs+HJd/VL4XYnuXOpoZYn6fiV2Db dvrA0fQZqixz22PvIvQi1SGdOqPHrenRKMd6586fmynzzUkKVbVjPDqbhzLqj76e 4liEAEleAFCmkyggYwiDcNCPGgOp/H2+YtAv/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1774456056; x= 1774542456; bh=TY9jqHYFMwOcMQ2IYaEX+53FcHDseBVUfEDoWckrSvg=; b=B 3IlsxAgG+LopOlitDroiaKeE8O9bOBb4PFdqikvnAibH8B5uEhUpZtAJMecERkfM awEkIF4uvpgIIytWJFv1O/iDVs4N7XIkugrvJlj0KU/xj+TE6QTOKpLfYEBOGsd2 xf9cjwREiUT1+a03OkQ4YF51fQeXQ8E5CgDwxAo7AH87lUHoms6iAS442mbSs85N ruKZThmCg+tKzFGrdgzro5J8DoW0IMaN1DrPPhDAbBQZg1qKP7EzKZ3GdnZVl+06 /9Jm3tqOKIqtLUHOZVCUCrcYsEWG7AUfr2q1NwZyRCBkivnQVbByx5e+TPERWOPs IolDRxI/RO1NHa0Od64Ww== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefvdegleegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgheqne cuggftrfgrthhtvghrnhepgfejtdfhkeeftdeugfeileehteeljeeghfeuledthfeutedv ffdukeefjefhgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthho peegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehnrghthhgrnhgusghoshhsrg hrthesghhmrghilhdrtghomhdprhgtphhtthhopegrnhgurhgvshesrghnrghrrgiivghl rdguvgdprhgtphhtthhopegrlhhvhhgvrhhrvgeskhhurhhilhgvmhhurdguvgdprhgtph htthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdr ohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Mar 2026 12:27:34 -0400 (EDT) Message-ID: Date: Wed, 25 Mar 2026 17:27:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: remove bits* types To: Nathan Bossart , Andres Freund Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , Pg Hackers References: Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 18.03.26 22:38, Nathan Bossart wrote: > (new thread) > > On Wed, Mar 18, 2026 at 04:17:40PM -0500, Nathan Bossart wrote: >> On Tue, Mar 17, 2026 at 05:09:49PM -0400, Andres Freund wrote: >>> Personally I object to the existence of the bits* types, to me they're just >>> noise over using the corresponding unsigned integer types. One more thing that >>> one has to just know what it means without there being any actual improved >>> type checking or such. It's not like using bits* would make it any easier to >>> make the underlying type a struct or such (which is different to >>> e.g. TransactionId, we could probably replace that with a struct without crazy >>> amounts of trouble). >> >> Yeah, I don't see why you'd prefer bits32 over uint32. If anything, uint32 >> is probably less confusing because most hackers will have used it before. >> AFAICT the bits* types are a relic of the 80s, and there used to be other >> types like bool8 and word32, all of which were just uint* behind the >> scenes. Those were removed in 2004 by commit ca7a1f0c86. I assume bits* >> was left behind because it was still in use. >> >>> I think we should just rip the bits* types out and replace them with the >>> underlying types. >> >> +1. If there seems to be consensus, I'm happy to write the patch. > > Well, in the process of seeing how bad the patch would look, I ended up > writing it. I used sed for most of this, and I tried to make all necessary > manual adjustments, but I may have missed a couple. I'm mildly in favor of removing them. But it appears there is no consensus.