diff options
Diffstat (limited to 'src/test/regress/expected')
-rw-r--r-- | src/test/regress/expected/aggregates.out | 11 | ||||
-rw-r--r-- | src/test/regress/expected/join.out | 2 | ||||
-rw-r--r-- | src/test/regress/expected/window.out | 14 | ||||
-rw-r--r-- | src/test/regress/expected/with.out | 4 |
4 files changed, 20 insertions, 11 deletions
diff --git a/src/test/regress/expected/aggregates.out b/src/test/regress/expected/aggregates.out index 5678f066cb..6ca73a0ed7 100644 --- a/src/test/regress/expected/aggregates.out +++ b/src/test/regress/expected/aggregates.out @@ -292,7 +292,7 @@ select ten, sum(distinct four) from onek a group by ten having exists (select 1 from onek b where sum(distinct a.four + b.four) = b.four); -ERROR: aggregates not allowed in WHERE clause +ERROR: aggregate functions are not allowed in WHERE LINE 4: where sum(distinct a.four + b.four) = b.four)... ^ -- Test handling of sublinks within outer-level aggregates. @@ -745,6 +745,15 @@ NOTICE: drop cascades to 3 other objects DETAIL: drop cascades to table minmaxtest1 drop cascades to table minmaxtest2 drop cascades to table minmaxtest3 +-- check for correct detection of nested-aggregate errors +select max(min(unique1)) from tenk1; +ERROR: aggregate function calls cannot be nested +LINE 1: select max(min(unique1)) from tenk1; + ^ +select (select max(min(unique1)) from int8_tbl) from tenk1; +ERROR: aggregate function calls cannot be nested +LINE 1: select (select max(min(unique1)) from int8_tbl) from tenk1; + ^ -- -- Test combinations of DISTINCT and/or ORDER BY -- diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out index c5b92582b4..5e17432198 100644 --- a/src/test/regress/expected/join.out +++ b/src/test/regress/expected/join.out @@ -3143,6 +3143,6 @@ LINE 1: ...m int4_tbl a full join lateral generate_series(0, a.f1) g on... DETAIL: The combining JOIN type must be INNER or LEFT for a LATERAL reference. -- LATERAL can be used to put an aggregate into the FROM clause of its query select 1 from tenk1 a, lateral (select max(a.unique1) from int4_tbl b) ss; -ERROR: aggregates not allowed in FROM clause +ERROR: aggregate functions are not allowed in FROM clause of their own query level LINE 1: select 1 from tenk1 a, lateral (select max(a.unique1) from i... ^ diff --git a/src/test/regress/expected/window.out b/src/test/regress/expected/window.out index fde375cc9f..7778626625 100644 --- a/src/test/regress/expected/window.out +++ b/src/test/regress/expected/window.out @@ -958,32 +958,32 @@ SELECT rank() OVER (ORDER BY length('abc')); -- can't order by another window function SELECT rank() OVER (ORDER BY rank() OVER (ORDER BY random())); -ERROR: window functions not allowed in window definition +ERROR: window functions are not allowed in window definitions LINE 1: SELECT rank() OVER (ORDER BY rank() OVER (ORDER BY random())... ^ -- some other errors SELECT * FROM empsalary WHERE row_number() OVER (ORDER BY salary) < 10; -ERROR: window functions not allowed in WHERE clause +ERROR: window functions are not allowed in WHERE LINE 1: SELECT * FROM empsalary WHERE row_number() OVER (ORDER BY sa... ^ SELECT * FROM empsalary INNER JOIN tenk1 ON row_number() OVER (ORDER BY salary) < 10; -ERROR: window functions not allowed in JOIN conditions +ERROR: window functions are not allowed in JOIN conditions LINE 1: SELECT * FROM empsalary INNER JOIN tenk1 ON row_number() OVE... ^ SELECT rank() OVER (ORDER BY 1), count(*) FROM empsalary GROUP BY 1; -ERROR: window functions not allowed in GROUP BY clause +ERROR: window functions are not allowed in GROUP BY LINE 1: SELECT rank() OVER (ORDER BY 1), count(*) FROM empsalary GRO... ^ SELECT * FROM rank() OVER (ORDER BY random()); -ERROR: cannot use window function in function expression in FROM +ERROR: window functions are not allowed in functions in FROM LINE 1: SELECT * FROM rank() OVER (ORDER BY random()); ^ DELETE FROM empsalary WHERE (rank() OVER (ORDER BY random())) > 10; -ERROR: window functions not allowed in WHERE clause +ERROR: window functions are not allowed in WHERE LINE 1: DELETE FROM empsalary WHERE (rank() OVER (ORDER BY random())... ^ DELETE FROM empsalary RETURNING rank() OVER (ORDER BY random()); -ERROR: cannot use window function in RETURNING +ERROR: window functions are not allowed in RETURNING LINE 1: DELETE FROM empsalary RETURNING rank() OVER (ORDER BY random... ^ SELECT count(*) OVER w FROM tenk1 WINDOW w AS (ORDER BY unique1), w AS (ORDER BY unique1); diff --git a/src/test/regress/expected/with.out b/src/test/regress/expected/with.out index 0d59ea3fdf..a491b2ca61 100644 --- a/src/test/regress/expected/with.out +++ b/src/test/regress/expected/with.out @@ -937,12 +937,12 @@ LINE 2: WHERE n IN (SELECT * FROM x)) -- aggregate functions WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT count(*) FROM x) SELECT * FROM x; -ERROR: aggregate functions not allowed in a recursive query's recursive term +ERROR: aggregate functions are not allowed in a recursive query's recursive term LINE 1: WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT count(*) F... ^ WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT sum(n) FROM x) SELECT * FROM x; -ERROR: aggregate functions not allowed in a recursive query's recursive term +ERROR: aggregate functions are not allowed in a recursive query's recursive term LINE 1: WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT sum(n) FRO... ^ -- ORDER BY |