|
|
|
|
@ -56,26 +56,20 @@ CREATE STATISTICS tst (unrecognized) ON x, y FROM ext_stats_test; |
|
|
|
|
ERROR: unrecognized statistics kind "unrecognized" |
|
|
|
|
-- unsupported targets |
|
|
|
|
CREATE STATISTICS tst ON a FROM (VALUES (x)) AS foo; |
|
|
|
|
ERROR: cannot create statistics on the specified relation |
|
|
|
|
DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views. |
|
|
|
|
ERROR: CREATE STATISTICS only supports relation names in the FROM clause |
|
|
|
|
CREATE STATISTICS tst ON a FROM foo NATURAL JOIN bar; |
|
|
|
|
ERROR: cannot create statistics on the specified relation |
|
|
|
|
DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views. |
|
|
|
|
ERROR: CREATE STATISTICS only supports relation names in the FROM clause |
|
|
|
|
CREATE STATISTICS tst ON a FROM (SELECT * FROM ext_stats_test) AS foo; |
|
|
|
|
ERROR: cannot create statistics on the specified relation |
|
|
|
|
DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views. |
|
|
|
|
ERROR: CREATE STATISTICS only supports relation names in the FROM clause |
|
|
|
|
CREATE STATISTICS tst ON a FROM ext_stats_test s TABLESAMPLE system (x); |
|
|
|
|
ERROR: cannot create statistics on the specified relation |
|
|
|
|
DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views. |
|
|
|
|
ERROR: CREATE STATISTICS only supports relation names in the FROM clause |
|
|
|
|
CREATE STATISTICS tst ON a FROM XMLTABLE('foo' PASSING 'bar' COLUMNS a text); |
|
|
|
|
ERROR: cannot create statistics on the specified relation |
|
|
|
|
DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views. |
|
|
|
|
ERROR: CREATE STATISTICS only supports relation names in the FROM clause |
|
|
|
|
CREATE FUNCTION tftest(int) returns table(a int, b int) as $$ |
|
|
|
|
SELECT $1, $1+i FROM generate_series(1,5) g(i); |
|
|
|
|
$$ LANGUAGE sql IMMUTABLE STRICT; |
|
|
|
|
CREATE STATISTICS alt_stat2 ON a FROM tftest(1); |
|
|
|
|
ERROR: cannot create statistics on the specified relation |
|
|
|
|
DETAIL: CREATE STATISTICS only supports tables, foreign tables and materialized views. |
|
|
|
|
ERROR: CREATE STATISTICS only supports relation names in the FROM clause |
|
|
|
|
DROP FUNCTION tftest; |
|
|
|
|
-- incorrect expressions |
|
|
|
|
CREATE STATISTICS tst ON (y) FROM ext_stats_test; -- single column reference |
|
|
|
|
|