Christopher Browne <cbbrowne(at)libertyrms(dot)info> writes:
> I am quite surprised that the original poster got to expect an
> implicit "ORDER BY 1, 2". That seems _quite_ surprising.
Pre-7.4, GROUP BY queries would tend to work like that, but it was
always an implementation artifact, never a documented much less
guaranteed behavior ...
regards, tom lane