1
0
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:
Tom Lane
1999-12-09 05:58:56 +00:00
parent d65a27f950
commit f7f41c7c8c
6 changed files with 122 additions and 78 deletions

View File

@@ -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
-----