From: | "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu> |
---|---|
To: | David Hartwig <daybee(at)bellatlantic(dot)net> |
Cc: | hackers <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] 6.4 Aggregate Bug |
Date: | 1998-08-01 14:36:12 |
Message-ID: | 35C327DC.9F87D7C6@alumni.caltech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> While testing my 6.4 patch to allow functions/expressions to be
> specified in the ORDER/GROUP BY clause (and not in the target list) I
> came across a nasty little bug.
> I backed out my patch, and discovered the bug was still present. The
> bug does not exist in version 6.3.2.
Nor in my cvs tree from around the second week in July (on or before
July 9, with a few patches committed to the Postgres tree afterwards).
Haven't tried a current source tree...
- Tom
>
> -- This crashes the backend
> select upper(a) as x, count(k) from t group by x;
tgl=> create table t (a text, k int);
CREATE
tgl=> select upper(a) as x, count(k) from t group by x;
x|count
-+-----
| 0
(1 row)
tgl=> insert into t values ('one', 1);
INSERT 643434 1
tgl=> insert into t values ('two', 2);
INSERT 643435 1
tgl=> insert into t values ('two', 2);
INSERT 643436 1
tgl=> select upper(a) as x, count(k) from t group by x;
x |count
---+-----
ONE| 1
TWO| 2
(2 rows)
And with your test case instead:
tgl=> select upper(a) as x, count(k) from t group by x;
x|count
-+-----
A| 4
B| 3
C| 3
(3 rows)
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1998-08-01 15:28:58 | Re: [HACKERS] Problem with CVS access to current sources |
Previous Message | Edmund Mergl | 1998-08-01 14:04:26 | Re: [HACKERS] 6.4 Aggregate Bug |