probably topic drift (was: [Rt-devel] Sortorder of customfields)
Andrew Sullivan
ajs at crankycanuck.ca
Fri Apr 28 11:12:36 EDT 2006
On Fri, Apr 28, 2006 at 11:01:31AM -0400, Jesse Vincent wrote:
> >
> > By looking at the svn repository I can see that 4254 is the last change
> > and it was introduced then. Looks like it is verbatim copied from Pg.pm
> > where this might be true.
>
> I'm pretty sure it is, there.
FWIW, I'll bet that the GROUP BY ORDER BY addition in any Postgres
related files was added because of the change in 8.x. Hash sorting
in that release meant that GROUP BY no longer entailed a return order
to results. Lots of people had relied on the old rule of thumb that
you could get away without the additional ORDER BY when you did GROUP
BY, because the old implementation required a qsort on the groups
before they could be grouped; so everything came back in the order
you expected. Once hash sorting was implemented, that assumption was
no longer true. (To be fair, Tom Lane had been warning everyone
since I started using Postgres that he was planning for that to
break. It just took him some time to get around to it.)
A
--
Andrew Sullivan | ajs at crankycanuck.ca
It is above all style through which power defers to reason.
--J. Robert Oppenheimer
More information about the Rt-devel
mailing list