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 1vNcro-0090fk-1G for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Nov 2025 20:08:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vNcrm-003vSN-1h for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Nov 2025 20:08:54 +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 1vNcrl-003vSE-1d for pgsql-hackers@lists.postgresql.org; Mon, 24 Nov 2025 20:08:54 +0000 Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vNcri-001G9d-1E for pgsql-hackers@postgresql.org; Mon, 24 Nov 2025 20:08:52 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 373CD14001F3; Mon, 24 Nov 2025 15:08:50 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Mon, 24 Nov 2025 15:08:50 -0500 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=1764014930; x=1764101330; bh=Q7h9LNc4rv 0SSFDR9ZFHhg6eruDs9l9fDFYn3kAYOoM=; b=LwFIVFfYR/Y59yz5cpIs8TAN+e 02YCQyjU4xkCdi+cSso+KkIzrx+DVnjOTNyt82RshieZb41TLZw9AuzeewsULtJ/ yu/PvsXEJgnO5z/4X2byW9vh+qXpBc0Ua6qQb92Wsij/jBm6ksPPfp10XUDG3hEY V1IKJ6VclI1BOjoF7q+CdjJn7VlJ+IAlQU+8wyR5uay2jbVyvrDzRUChFyuOgnfl na/S+oTO+mOYDbE1V+pV8PUPwvP3Xz/NJnYFe8fZYHLaMKwYXAHTHasXQYXaJize j75aFhy4daNuzQojJaNoaUwskMRR+IWMomBqN1rnyi4+bdQVcySoFIZGBM9Q== 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= 1764014930; x=1764101330; bh=Q7h9LNc4rv0SSFDR9ZFHhg6eruDs9l9fDFY n3kAYOoM=; b=DAqKYuVC1x3IkbGtqiAs4H+1lRcuvDCu4Y8Mc3vawkqk8rvJTNt 0R7Qch8tiQHaZIHRzVYkUBt8Ngn5bRmQwLP8AfRqT2Dq7jPViPsMBLAWwhJaNFJ5 IfG12bJh2Of1Qs2L8mm+/mvOIbsE9O+0tBCQYEvIVccaD1h/prSHM8v3WZUQ4BSQ /R7VqPIbneVc5c4ba19HGSrvgO/VanmGwuSVKplKk9cSnSNVaVLjiofjpAhXwyf8 i/QxVAqD4eOY28PzOWQRQNP7Z57kPzPxhZdojV2OBkY8s2Hene93fVARfFHKBFfP pGnefuSIjiOm3Q06j2NDF9cjI7SvYKADHkw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvfeelheduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefufhffjgfkfgggtgesmhdtreertderjeenucfhrhhomhepffgrghhfihhn nhcukfhlmhgrrhhiucforghnnhhsnohkvghruceoihhlmhgrrhhisehilhhmrghrihdroh hrgheqnecuggftrfgrthhtvghrnhepvddvhfehtdefkedugfetudefhefggfegjeeijeeh uefgteehgfegtdelgeetteejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrghrihdrohhrghdpnhgspghrtghpthht ohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvg hrshesphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepphgvthgvrhesvghishgv nhhtrhgruhhtrdhorhhgpdhrtghpthhtohepghgvihgurghvrdhpghesghhmrghilhdrtg homhdprhgtphhtthhopehrohgsvghrthhmhhgrrghssehgmhgrihhlrdgtohhmpdhrtghp thhtohepthhglhesshhsshdrphhghhdrphgrrdhush X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Nov 2025 15:08:47 -0500 (EST) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: Tom Lane Cc: Robert Haas , David Geier , Peter Eisentraut , pgsql-hackers Subject: Re: get rid of Pointer type, mostly References: <4154950a-47ae-4223-bd01-1235cc50e933@eisentraut.org> <955002.1764000569@sss.pgh.pa.us> <957744.1764002037@sss.pgh.pa.us> <970261.1764008763@sss.pgh.pa.us> <646aa41b-9810-442e-9a5a-69a5604190d4@gmail.com> <985179.1764011713@sss.pgh.pa.us> Date: Mon, 24 Nov 2025 20:08:46 +0000 In-Reply-To: <985179.1764011713@sss.pgh.pa.us> (Tom Lane's message of "Mon, 24 Nov 2025 14:15:13 -0500") Message-ID: <87jyzf6vn5.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 Tom Lane writes: > Robert Haas writes: >> On Mon, Nov 24, 2025 at 1:46 PM David Geier wrote: >>> The GIN code makes use of pointer but src/backend/access/gin only has 29 >>> occurrences. If you like I can help out fixing up the GIN code and share >>> a page here. Let me know. > >> I'd go for it! I mean, who knows whether your patch will be accepted? >> But another pair of eyes couldn't hurt. It seems like we all agree >> that a full removal of Pointer would be better than a partial removal; >> it's just a question of whether we can get there without too much >> other awkwardness. > > If there are actually places in GIN where using void* would be less > readable than using Pointer, that would certainly be interesting > information. Perhaps the patch would need to spend some effort > on adding comments, not just mechanically replacing the typedef? I got curious and did the replacement, and IMO there's no need for any further commentary than what's already there. I did however take the opportunity to get rid of some pointless casts (except the return value of PG_GETARG_POINTER(), which seems to be de rigueur to redundantly cast), and to convert a nearby char * that's only used for memcpy() to void *. - ilmari --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Convert-remaning-uses-of-Pointer-to-void.patch