mirror of
https://github.com/postgres/postgres.git
synced 2025-12-18 05:01:01 +03:00
Replace generic 'Illegal use of aggregates' error message with one that
shows the specific ungrouped variable being complained of. Perhaps this will reduce user confusion...
This commit is contained in:
@@ -32,7 +32,7 @@ count
|
||||
(6 rows)
|
||||
|
||||
QUERY: SELECT count(*) FROM test_missing_target GROUP BY a ORDER BY b;
|
||||
ERROR: Illegal use of aggregates or non-group column in target list
|
||||
ERROR: Attribute test_missing_target.b must be GROUPed or used in an aggregate function
|
||||
QUERY: SELECT count(*) FROM test_missing_target GROUP BY b ORDER BY b;
|
||||
count
|
||||
-----
|
||||
@@ -194,7 +194,7 @@ count
|
||||
(4 rows)
|
||||
|
||||
QUERY: SELECT count(a) FROM test_missing_target GROUP BY a ORDER BY b;
|
||||
ERROR: Illegal use of aggregates or non-group column in target list
|
||||
ERROR: Attribute test_missing_target.b must be GROUPed or used in an aggregate function
|
||||
QUERY: SELECT count(b) FROM test_missing_target GROUP BY b/2 ORDER BY b/2;
|
||||
count
|
||||
-----
|
||||
|
||||
Reference in New Issue
Block a user