From: | "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu> |
---|---|
To: | Darren King <darrenk(at)insightdist(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] No: implied sort with group by |
Date: | 1998-01-29 03:14:37 |
Message-ID: | 34CFF41C.2C5D9B1E@alumni.caltech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > postgres=> select b,c,sum(a) from t1 group by b,c;
> > b|c|sum
> > -+-+---
> > |x| 5
> > |z| 3
> > |x| 0
> > (3 rows)
> >
> > postgres=> select * from t1;
> > a|b|c
> > -+-+-
> > 1| |x
> > 2| |x
> > 2| |x
> > 3| |z
> > 0| |x
> > (5 rows)
> >
> > I just inserted a single out-of-order row at the end of the table which, since the
> > integer value is zero, should have not affected the result. Sorry I didn't understand
> > the nature of the test case.
> Hmmm...is this a grouping problem or an aggregate problem? Or both? The first
> query above should have the data sorted before aggregating, shouldn't it, or I
> am still missing a piece of this puzzle?
fwiw, I see the same incorrect behavior in v6.2.1p5.
- Tom
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-01-29 04:58:15 | 6.3 CHANGES list |
Previous Message | The Hermit Hacker | 1998-01-28 23:58:54 | Re: [HACKERS] postmaster crash and .s.pgsql file |