Doug McNaught <doug@wireboard.com> writes:
> Actually, the C standard says nothing about what algorithm should be
> used for qsort(); it's simply supposed to be a fast in-memory sort.
> The qsort() name is just a historical artifact.
In practice I believe qsort usually is a quicksort; it's just too good
of a general-purpose algorithm. However you do need a good heuristic
for selecting the median value to split on, or you can get burnt by
corner cases. I'm guessing that Sun was careless and got burnt ...
regards, tom lane