Re: 'GROUP BY' / 'DISTINCT' interaction bug?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Mark Hollomon" <mhh@nortelnetworks.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2000-08-07T15:59:38Z
Lists: 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