Re: remove the unneeded header file math.h in binaryheap.c

Álvaro Herrera <alvherre@kurilemu.de>

From: Álvaro Herrera <alvherre@kurilemu.de>
To: liujinyang <21043272@qq.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-01-15T13:43:57Z
Lists: pgsql-hackers

Attachments

On 2026-Jan-15, Álvaro Herrera wrote:

> On 2026-01-15, liujinyang wrote:
> > Hi Alvora, 
> > thanks for your review.
> > So wha't the next should I do for commit it, because this is my first patch.
> 
> Nothing.  I'll push it soon, no worries.

BTW how did you notice that the include wasn't necessary?

I looked around to see if there are more unnecessary inclusions of that
header and found a few candidates.  Things still compile and pass tests
for me, but of course they may fail on other platforms.
https://cirrus-ci.com/build/4766393398198272

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/

Commits

  1. Remove #include <math.h> where not needed

  2. Remove unnecessary uses of Abs()

  3. Basic binary heap implementation.