I noticed a small bug in the Sort Method code:
postgres=# explain analyze select * from test order by random() limit 1;
QUERY PLAN
Gregory Stark [EMAIL PROTECTED] writes:
It's printing quicksort even though it used a heap. This happens because we
don't bother deheapifying a singleton heap so the boundUsed flag never gets
set. The patch below just moves setting that flag to when the heap is made
instead of when it's
I wrote:
Hmm. Actually, given that sort_bounded_heap() is only conditionally
invoked, *both* of the state updates it makes are bogus.
Er, make that three state updates: its REVERSEDIRECTION() operation is
being skipped as well. That's not critical now, but might be someday.
Rather than