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 1sbL3V-00FrAy-50 for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Aug 2024 14:20:53 +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 1sbL3T-000C9U-CS for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Aug 2024 14:20:51 +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.94.2) (envelope-from ) id 1sbL3T-000C9I-0x for pgsql-hackers@lists.postgresql.org; Tue, 06 Aug 2024 14:20:51 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sbL3Q-003OH6-IL for pgsql-hackers@lists.postgresql.org; Tue, 06 Aug 2024 14:20:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 476EKacg1338739; Tue, 6 Aug 2024 10:20:36 -0400 From: Tom Lane To: Heikki Linnakangas cc: Bertrand Drouvot , pgsql-hackers@lists.postgresql.org Subject: Re: Fix comments in instr_time.h and remove an unneeded cast to int64 In-reply-to: References: Comments: In-reply-to Heikki Linnakangas message dated "Tue, 06 Aug 2024 14:28:38 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1338737.1722954036.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 06 Aug 2024 10:20:36 -0400 Message-ID: <1338738.1722954036@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Heikki Linnakangas writes: > On 06/08/2024 11:54, Bertrand Drouvot wrote: >> Please find attached a tiny patch to correct those and, in passing, rem= ove what >> I think is an unneeded cast to int64. > Applied, thanks! I think this comment change is a dis-improvement. It's removed the documentation of the important fact that INSTR_TIME_GET_MICROSEC and INSTR_TIME_GET_NANOSEC return a different data type from INSTR_TIME_GET_MILLISEC (ie, integer versus float). Also, the expectation is that users of these APIs do not know the actual data type of instr_time, and instead we tell them what the output of those macros is. This patch just blew a hole in that abstraction. regards, tom lane