Re: [PATCH] binary heap implementation

From: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] binary heap implementation
Date: 2012-11-22 02:39:51
Message-ID: 20121122023951.GA26315@toroid.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 2012-11-21 15:09:12 -0500, robertmhaas(at)gmail(dot)com wrote:
>
> > The following comments still talk about "key and value", thus need
> > an update:
>
> Oops.

In the same vein, "Returns NULL if the heap is empty" no longer applies
to binaryheap_first and binaryheap_remove_first. Plus there is an extra
asterisk in the middle of the comment about binaryheap_replace_first.

But it looks good otherwise.

I agree with Tom that we should support resizing the heap, but let's not
bother with that now. I'll write the few extra lines of code the first
time something actually needs to add more elements to a heap.

-- Abhijit

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2012-11-22 03:40:01 Re: StrategyGetBuffer questions
Previous Message Jeff Davis 2012-11-22 02:24:57 Removing PD_ALL_VISIBLE