Re: 'GROUP BY' / 'DISTINCT' interaction bug? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 'GROUP BY' / 'DISTINCT' interaction bug?
Date
Msg-id 6345.965663978@sss.pgh.pa.us
Whole thread Raw
In response to 'GROUP BY' / 'DISTINCT' interaction bug?  ("Mark Hollomon" <mhh@nortelnetworks.com>)
List pgsql-hackers
"Mark Hollomon" <mhh@nortelnetworks.com> writes:
> select distinct on (c, i) c, count(i) from t group by c;
> ERROR:  Attribute t.i must be GROUPed or used in an aggregate function

Why do you think that's a bug?  The DISTINCT clause requires use of
the ungrouped value of i, doesn't it?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: Re: Re: [GENERAL] Trouble with float4 after upgrading from 6.5.3 to 7.0.2
Next
From: Thomas Swan
Date:
Subject: UNIONS