mirror of https://github.com/citusdata/citus.git
Update some error messages in statistics
Relevant PG commits: https://github.com/postgres/postgres/commit/ab16418ee https://github.com/postgres/postgres/commit/f225473cb https://github.com/postgres/postgres/commit/f9b41f3e1naisila/bump-pg-versions
parent
6f055c0f96
commit
422375459d
|
|
@ -8,12 +8,12 @@ SELECT substring(:'server_version', '\d+')::int >= 18 AS server_version_ge_18
|
|||
-- behavior is same among PG versions, error message differs
|
||||
-- relevant PG18 commit: 3eea4dc2c7, 38883916e
|
||||
CREATE STATISTICS tst ON a FROM (VALUES (x)) AS foo;
|
||||
ERROR: only a single relation is allowed in CREATE STATISTICS
|
||||
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: only a single relation is allowed in CREATE STATISTICS
|
||||
ERROR: CREATE STATISTICS only supports relation names in the FROM clause
|
||||
DROP FUNCTION tftest;
|
||||
\if :server_version_ge_18
|
||||
\else
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ SELECT create_distributed_table('test_stats', 'a');
|
|||
(1 row)
|
||||
|
||||
CREATE STATISTICS pg_temp.s1 (dependencies) ON a, b FROM test_stats;
|
||||
ERROR: "statistics object s1" has dependency on unsupported object "schema pg_temp_xxx"
|
||||
ERROR: "statistics object pg_temp_xxx.s1" has dependency on unsupported object "schema pg_temp_xxx"
|
||||
CREATE STATISTICS s1 (dependencies) ON a, b FROM test_stats;
|
||||
-- test for distributing an already existing statistics
|
||||
CREATE TABLE "test'stats2" (
|
||||
|
|
|
|||
Loading…
Reference in New Issue