Re: Fix comments in instr_time.h and remove an unneeded cast to int64
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2024-08-06T14:20:36Z
Lists: pgsql-hackers
Heikki Linnakangas <hlinnaka@iki.fi> writes: > On 06/08/2024 11:54, Bertrand Drouvot wrote: >> Please find attached a tiny patch to correct those and, in passing, remove 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
Commits
-
Fix datatypes in comments in instr_time.h
- a54d4ed18392 18.0 landed
-
Revert "Fix comments in instr_time.h and remove an unneeded cast to int64"
- 39a138fbef87 18.0 landed
-
Fix comments in instr_time.h and remove an unneeded cast to int64
- 3dcb09de7bb2 18.0 landed