@@ -56,29 +56,22 @@ CREATE STATISTICS tst (unrecognized) ON x, y FROM ext_stats_test;
5656ERROR: unrecognized statistics kind "unrecognized"
5757-- unsupported targets
5858CREATE STATISTICS tst ON a FROM (VALUES (x)) AS foo;
59- ERROR: cannot create statistics on the specified relation
60- DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views.
59+ ERROR: CREATE STATISTICS only supports relation names in the FROM clause
6160CREATE STATISTICS tst ON a FROM foo NATURAL JOIN bar;
62- ERROR: cannot create statistics on the specified relation
63- DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views.
61+ ERROR: CREATE STATISTICS only supports relation names in the FROM clause
6462CREATE STATISTICS tst ON a FROM (SELECT * FROM ext_stats_test) AS foo;
65- ERROR: cannot create statistics on the specified relation
66- DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views.
63+ ERROR: CREATE STATISTICS only supports relation names in the FROM clause
6764CREATE STATISTICS tst ON a FROM ext_stats_test s TABLESAMPLE system (x);
68- ERROR: cannot create statistics on the specified relation
69- DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views.
65+ ERROR: CREATE STATISTICS only supports relation names in the FROM clause
7066CREATE STATISTICS tst ON a FROM XMLTABLE('foo' PASSING 'bar' COLUMNS a text);
71- ERROR: cannot create statistics on the specified relation
72- DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views.
67+ ERROR: CREATE STATISTICS only supports relation names in the FROM clause
7368CREATE STATISTICS tst ON a FROM JSON_TABLE(jsonb '123', '$' COLUMNS (item int));
74- ERROR: cannot create statistics on the specified relation
75- DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views.
69+ ERROR: CREATE STATISTICS only supports relation names in the FROM clause
7670CREATE FUNCTION tftest(int) returns table(a int, b int) as $$
7771SELECT $1, $1+i FROM generate_series(1,5) g(i);
7872$$ LANGUAGE sql IMMUTABLE STRICT;
7973CREATE STATISTICS alt_stat2 ON a FROM tftest(1);
80- ERROR: cannot create statistics on the specified relation
81- DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views.
74+ ERROR: CREATE STATISTICS only supports relation names in the FROM clause
8275DROP FUNCTION tftest;
8376-- incorrect expressions
8477CREATE STATISTICS tst ON (y) FROM ext_stats_test; -- single column reference
0 commit comments