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 1vszRz-00DBQ8-0B for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Feb 2026 08:31:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vszRx-002kf3-02 for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Feb 2026 08:31:53 +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 1vszRv-002kev-2s for pgsql-hackers@lists.postgresql.org; Thu, 19 Feb 2026 08:31:52 +0000 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vszRs-000000006ca-2DmR for pgsql-hackers@lists.postgresql.org; Thu, 19 Feb 2026 08:31:51 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 455797A011F; Thu, 19 Feb 2026 03:31:48 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 19 Feb 2026 03:31:48 -0500 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=fm2; t=1771489908; x=1771576308; bh=z7hTxBeufNSuVbzHlzKPEbs8b9ie4s2c PtbipOpO678=; b=oFx8Os/y3AJVPiBWYQkes+KhzVhP37X6lt0JPrzlXggFrFtR eXZ6Ak1IJxcmESe+H2yhyQ+1zKmv0Fuihb1Iz8bCTS2CnCPB2kqcUZLMqnA0BjWh ytXQeCbMBBfyGlEqIIGUZtzHio7l8EdkQHhHXCZEHHOWtUtkuVGQNaPUcCprGcbu UTWK2Ldysg17UGX+bUE/yYMzofQ3PygySebPjmkh9GSSCirwUTJKlbXpWCLe8vJk EHoSQ+GWm7Ayx/1IdAGZNdAbC3gM52RR+DcQgSDj6yfy+tsCzbjS01UtXKfEA2A+ KqUjnWEFzx4znrHZdtQJwTfPV7BMySZ63qTgkQ== 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=fm3; t=1771489908; x= 1771576308; bh=z7hTxBeufNSuVbzHlzKPEbs8b9ie4s2cPtbipOpO678=; b=d 3oUe6nyZTXviSqV/kzygiFrUFjh/9YXiu+ZjfjztInLxwO7SXqO2eklDi2gSPJ/T iOEV21pXev/BsZ5EISHqSyxLCYLn34NiAZyHU7pkYnGqTng1Bi2pIX1WesdEdEv+ DfmdYkBf+aK8U1paQFaGuZ8blt48m8SNUJNuG5grDtF4oLZZe/gDaidgJX0ieWB9 kR/VbebEjEE8cXMAVymZkSkZBqsAqnHrwvvy8jcmFyFfNI8VSKnz0GHOVgE4ZlQm 7gwUg2Vvr7l3cFGawcieqYWKWOjlZcBeIdtE5Ntcx7hyCc4YUT3pSbZGCsnYPg/0 L/MCxcupeTeZbjqbRAB/Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvvdehtdehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgheqne cuggftrfgrthhtvghrnhepveehvdekleetveegvdevtefhffetvdehteeuueejhfeiudfg ieffhfffgefhhfeunecuffhomhgrihhnpehophgvnhdqshhtugdrohhrghenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrsegvihhs vghnthhrrghuthdrohhrghdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouh htpdhrtghpthhtohepphhoshhtghhrvghssehjvghlthgvfhdrnhhlpdhrtghpthhtohep phhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpd hrtghpthhtohepthhhohhmrghsrdhmuhhnrhhosehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Feb 2026 03:31:46 -0500 (EST) Message-ID: <8f8776be-6d8f-4e1c-8d21-e55052edd91b@eisentraut.org> Date: Thu, 19 Feb 2026 09:31:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Make copyObject work in C++ To: Jelte Fennema-Nio Cc: PostgreSQL Hackers , Thomas Munro References: <4d8b9e53-3f37-43f0-a4aa-5bda9c7961b3@eisentraut.org> <4e82f77b-acad-4356-94f6-8255135fb36b@eisentraut.org> <2h2n2gyw2f4ucicbl3drtdkjt2wzf6b2r4wqm7xwks6vpx5j7n@imymv4hkz5jz> 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 13.02.26 11:28, Jelte Fennema-Nio wrote: > Patch 3 makes copyObject work when using GCC or Clang with -std=c++11 by > introducing pg_exprtype. > > Patch 4 starts using pg_exprtype in more places. I found this paper https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2927.htm which led to the addition of typeof into the C standard. It contains a section 'Why not "decltype"?' that explains how decltype is different, but it also explains that if typeof were added to C++, then it would be std::remove_reference_t What I suggest we should do here is: 1. Add a configure test that checks if the C++ compiler supports typeof. 2. If not, #define typeof to the above expression. Then code can continue to use typeof unchanged.