--
-- CREATE_TABLE
--
--
-- CLASS DEFINITIONS
--
CREATE TABLE hobbies_r (
name text,
person text
);
CREATE TABLE equipment_r (
name text,
hobby text
);
CREATE TABLE onek (
unique1 int4,
unique2 int4,
two int4,
four int4,
ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
odd int4,
even int4,
stringu1 name,
stringu2 name,
string4 name
);
CREATE TABLE tenk1 (
unique1 int4,
unique2 int4,
two int4,
four int4,
ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
odd int4,
even int4,
stringu1 name,
stringu2 name,
string4 name
);
CREATE TABLE tenk2 (
unique1 int4,
unique2 int4,
two int4,
four int4,
ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
odd int4,
even int4,
stringu1 name,
stringu2 name,
string4 name
);
CREATE TABLE person (
name text,
age int4,
location point
);
CREATE TABLE emp (
salary int4,
manager name
) INHERITS (person);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE emp (
^
CREATE TABLE student (
gpa float8
) INHERITS (person);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE student (
^
CREATE TABLE stud_emp (
percent int4
) INHERITS (emp, student);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE stud_emp (
^
CREATE TABLE city (
name name,
location box,
budget city_budget
);
CREATE TABLE dept (
dname name,
mgrname text
);
CREATE TABLE slow_emp4000 (
home_base box
);
CREATE TABLE fast_emp4000 (
home_base box
);
CREATE TABLE road (
name text,
thepath path
);
CREATE TABLE ihighway () INHERITS (road);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE ihighway () INHERITS (road);
^
CREATE TABLE shighway (
surface text
) INHERITS (road);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE shighway (
^
CREATE TABLE real_city (
pop int4,
cname text,
outline path
);
--
-- test the "star" operators a bit more thoroughly -- this time,
-- throw in lots of NULL fields...
--
-- a is the type root
-- b and c inherit from a (one-level single inheritance)
-- d inherits from b and c (two-level multiple inheritance)
-- e inherits from c (two-level single inheritance)
-- f inherits from e (three-level single inheritance)
--
CREATE TABLE a_star (
class char,
a int4
);
CREATE TABLE b_star (
b text
) INHERITS (a_star);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE b_star (
^
CREATE TABLE c_star (
c name
) INHERITS (a_star);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE c_star (
^
CREATE TABLE d_star (
d float8
) INHERITS (b_star, c_star);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE d_star (
^
CREATE TABLE e_star (
e int2
) INHERITS (c_star);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE e_star (
^
CREATE TABLE f_star (
f polygon
) INHERITS (e_star);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE f_star (
^
CREATE TABLE aggtest (
a int2,
b float4
);
CREATE TABLE hash_i4_heap (
seqno int4,
random int4
);
CREATE TABLE hash_name_heap (
seqno int4,
random name
);
CREATE TABLE hash_txt_heap (
seqno int4,
random text
);
CREATE TABLE hash_f8_heap (
seqno int4,
random float8
);
-- don't include the hash_ovfl_heap stuff in the distribution
-- the data set is too large for what it's worth
--
-- CREATE TABLE hash_ovfl_heap (
-- x int4,
-- y int4
-- );
CREATE TABLE bt_i4_heap (
seqno int4,
random int4
);
CREATE TABLE bt_name_heap (
seqno name,
random int4
);
CREATE TABLE bt_txt_heap (
seqno text,
random int4
);
CREATE TABLE bt_f8_heap (
seqno float8,
random int4
);
CREATE TABLE array_op_test (
seqno int4,
i int4[],
t text[]
);
CREATE TABLE array_index_op_test (
seqno int4,
i int4[],
t text[]
);
CREATE TABLE testjsonb (
j jsonb
);
CREATE TABLE unknowntab (
u unknown -- fail
);
CREATE TYPE unknown_comptype AS (
u unknown -- fail
);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 314
CREATE TYPE unknown_comptype AS (
^
CREATE TABLE IF NOT EXISTS test_tsvector(
t text,
a tsvector
);
CREATE TABLE IF NOT EXISTS test_tsvector(
t text
);
-- invalid: non-lowercase quoted reloptions identifiers
CREATE TABLE tas_case WITH ("Fillfactor" = 10) AS SELECT 1 a;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 277
-- invalid: non-lowercase quoted reloptions identifiers
^
CREATE TEMP TABLE explicitly_temp (a int primary key); -- also OK
CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 277
CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
^
CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 277
CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
^
CREATE TABLE IF NOT EXISTS as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 277
CREATE TABLE IF NOT EXISTS as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
^
DROP TABLE as_select1;
PREPARE select1 AS SELECT 1 as a;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 301
PREPARE select1 AS SELECT 1 as a;
^
CREATE TABLE as_select1 AS EXECUTE select1;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 277
CREATE TABLE as_select1 AS EXECUTE select1;
^
CREATE TABLE as_select1 AS EXECUTE select1;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 277
CREATE TABLE as_select1 AS EXECUTE select1;
^
SELECT * FROM as_select1;
-stdin-:: Fatal: Table metadata loading
-stdin-:: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.as_select1
CREATE TABLE IF NOT EXISTS as_select1 AS EXECUTE select1;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 277
CREATE TABLE IF NOT EXISTS as_select1 AS EXECUTE select1;
^
DROP TABLE as_select1;
DEALLOCATE select1;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 303
DEALLOCATE select1;
^
-- create an extra wide table to test for issues related to that
-- (temporarily hide query, to avoid the long CREATE TABLE stmt)
\set ECHO none
Metacommand \set ECHO none is not supported
SELECT 'CREATE TABLE extra_wide_table(firstc text, '|| array_to_string(array_agg('c'||i||' bool'),',')||', lastc text);'
FROM generate_series(1, 1100) g(i)
\gexec
Metacommand \gexec is not supported
\set ECHO all
Metacommand \set ECHO all is not supported
INSERT INTO extra_wide_table(firstc, lastc) VALUES('first col', 'last col');
-stdin-:: Fatal: Table metadata loading
-stdin-:: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.extra_wide_table
SELECT firstc, lastc FROM extra_wide_table;
-stdin-:: Fatal: Table metadata loading
-stdin-:: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.extra_wide_table
-- check that tables with oids cannot be created anymore
CREATE TABLE withoid() WITH OIDS;
-stdin-:: Error: Parse Sql
-stdin-::2:29: Error: ERROR: syntax error at or near "OIDS"
CREATE TABLE withoid() WITH OIDS;
^
CREATE TABLE withoid() WITH (oids);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table options not supported
CREATE TABLE withoid() WITH (oids);
^
CREATE TABLE withoid() WITH (oids = true);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table options not supported
CREATE TABLE withoid() WITH (oids = true);
^
-- but explicitly not adding oids is still supported
CREATE TEMP TABLE withoutoid() WITHOUT OIDS;
DROP TABLE withoutoid;
CREATE TEMP TABLE withoutoid() WITH (oids = false);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table options not supported
CREATE TEMP TABLE withoutoid() WITH (oids = false);
^
DROP TABLE withoutoid;
-- check restriction with default expressions
-- invalid use of column reference in default expressions
CREATE TABLE default_expr_column (id int DEFAULT (id));
-stdin-:: Error: Parse Sql
-stdin-::3:51: Error: Columns are not allowed in: DEFAULT
CREATE TABLE default_expr_column (id int DEFAULT (id));
^
CREATE TABLE default_expr_column (id int DEFAULT (bar.id));
-stdin-:: Error: Parse Sql
-stdin-::1:51: Error: Columns are not allowed in: DEFAULT
CREATE TABLE default_expr_column (id int DEFAULT (bar.id));
^
CREATE TABLE default_expr_agg_column (id int DEFAULT (avg(id)));
-stdin-:: Error: Parse Sql
-stdin-::1:55: Error: Aggregate functions are not allowed in: DEFAULT
CREATE TABLE default_expr_agg_column (id int DEFAULT (avg(id)));
^
-- invalid column definition
CREATE TABLE default_expr_non_column (a int DEFAULT (avg(non_existent)));
-stdin-:: Error: Parse Sql
-stdin-::2:54: Error: Aggregate functions are not allowed in: DEFAULT
CREATE TABLE default_expr_non_column (a int DEFAULT (avg(non_existent)));
^
-- invalid use of aggregate
CREATE TABLE default_expr_agg (a int DEFAULT (avg(1)));
-stdin-:: Error: Parse Sql
-stdin-::2:47: Error: Aggregate functions are not allowed in: DEFAULT
CREATE TABLE default_expr_agg (a int DEFAULT (avg(1)));
^
-- invalid use of subquery
CREATE TABLE default_expr_agg (a int DEFAULT (select 1));
-stdin-:: Error: Parse Sql
-stdin-::2:46: Error: SubLinks are not allowed in: DEFAULT
CREATE TABLE default_expr_agg (a int DEFAULT (select 1));
^
-- invalid use of set-returning function
CREATE TABLE default_expr_agg (a int DEFAULT (generate_series(1,3)));
-stdin-:: Error: Parse Sql
-stdin-::2:47: Error: Generator functions are not allowed in: DEFAULT
CREATE TABLE default_expr_agg (a int DEFAULT (generate_series(1,3)));
^
-- Verify that subtransaction rollback restores rd_createSubid.
BEGIN;
CREATE TABLE remember_create_subid (c int);
SAVEPOINT q;
DROP TABLE remember_create_subid;
ROLLBACK TO q;
COMMIT;
DROP TABLE remember_create_subid;
-- Verify that subtransaction rollback restores rd_firstRelfilenodeSubid.
CREATE TABLE remember_node_subid (c int);
BEGIN;
ALTER TABLE remember_node_subid ALTER c TYPE bigint;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: alternative is not implemented yet : 245
ALTER TABLE remember_node_subid ALTER c TYPE bigint;
^
SAVEPOINT q;
DROP TABLE remember_node_subid;
ROLLBACK TO q;
COMMIT;
DROP TABLE remember_node_subid;
--
-- Partitioned tables
--
-- cannot combine INHERITS and PARTITION BY (although grammar allows)
CREATE TABLE partitioned (
a int
) INHERITS (some_table) PARTITION BY LIST (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
--
^
-- cannot use more than 1 column as partition key for list partitioned table
CREATE TABLE partitioned (
a1 int,
a2 int
) PARTITION BY LIST (a1, a2); -- fail
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- cannot use more than 1 column as partition key for list partitioned table
^
-- unsupported constraint type for partitioned tables
CREATE TABLE partitioned (
a int,
EXCLUDE USING gist (a WITH &&)
) PARTITION BY RANGE (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- unsupported constraint type for partitioned tables
^
-- prevent using prohibited expressions in the key
CREATE FUNCTION retset (a int) RETURNS SETOF int AS $$ SELECT 1; $$ LANGUAGE SQL IMMUTABLE;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 261
-- prevent using prohibited expressions in the key
^
CREATE TABLE partitioned (
a int
) PARTITION BY RANGE (retset(a));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
DROP FUNCTION retset(int);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: DropStmt: alternative is not implemented yet : 386
DROP FUNCTION retset(int);
^
CREATE TABLE partitioned (
a int
) PARTITION BY RANGE ((avg(a)));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
CREATE TABLE partitioned (
a int,
b int
) PARTITION BY RANGE ((avg(a) OVER (PARTITION BY b)));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
CREATE TABLE partitioned (
a int
) PARTITION BY LIST ((a LIKE (SELECT 1)));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
CREATE TABLE partitioned (
a int
) PARTITION BY RANGE ((42));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
CREATE FUNCTION const_func () RETURNS int AS $$ SELECT 1; $$ LANGUAGE SQL IMMUTABLE;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 261
CREATE FUNCTION const_func () RETURNS int AS $$ SELECT 1; $$ LANGUAGE SQL IMMUTABLE;
^
CREATE TABLE partitioned (
a int
) PARTITION BY RANGE (const_func());
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
DROP FUNCTION const_func();
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: DropStmt: alternative is not implemented yet : 386
DROP FUNCTION const_func();
^
-- only accept valid partitioning strategy
CREATE TABLE partitioned (
a int
) PARTITION BY MAGIC (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- only accept valid partitioning strategy
^
-- specified column must be present in the table
CREATE TABLE partitioned (
a int
) PARTITION BY RANGE (b);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- specified column must be present in the table
^
-- cannot use system columns in partition key
CREATE TABLE partitioned (
a int
) PARTITION BY RANGE (xmin);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- cannot use system columns in partition key
^
-- cannot use pseudotypes
CREATE TABLE partitioned (
a int,
b int
) PARTITION BY RANGE (((a, b)));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- cannot use pseudotypes
^
CREATE TABLE partitioned (
a int,
b int
) PARTITION BY RANGE (a, ('unknown'));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
-- functions in key must be immutable
CREATE FUNCTION immut_func (a int) RETURNS int AS $$ SELECT a + random()::int; $$ LANGUAGE SQL;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 261
-- functions in key must be immutable
^
CREATE TABLE partitioned (
a int
) PARTITION BY RANGE (immut_func(a));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
DROP FUNCTION immut_func(int);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: DropStmt: alternative is not implemented yet : 386
DROP FUNCTION immut_func(int);
^
-- prevent using columns of unsupported types in key (type must have a btree operator class)
CREATE TABLE partitioned (
a point
) PARTITION BY LIST (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- prevent using columns of unsupported types in key (type must have a btree operator class)
^
CREATE TABLE partitioned (
a point
) PARTITION BY LIST (a point_ops);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
CREATE TABLE partitioned (
a point
) PARTITION BY RANGE (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
CREATE TABLE partitioned (
a point
) PARTITION BY RANGE (a point_ops);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
-- cannot add NO INHERIT constraints to partitioned tables
CREATE TABLE partitioned (
a int,
CONSTRAINT check_a CHECK (a > 0) NO INHERIT
) PARTITION BY RANGE (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- cannot add NO INHERIT constraints to partitioned tables
^
-- some checks after successful creation of a partitioned table
CREATE FUNCTION plusone(a int) RETURNS INT AS $$ SELECT a+1; $$ LANGUAGE SQL;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 261
-- some checks after successful creation of a partitioned table
^
CREATE TABLE partitioned (
a int,
b int,
c text,
d text
) PARTITION BY RANGE (a oid_ops, plusone(b), c collate "default", d collate "C");
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE partitioned (
^
-- check relkind
SELECT relkind FROM pg_class WHERE relname = 'partitioned';
-- prevent a function referenced in partition key from being dropped
DROP FUNCTION plusone(int);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: DropStmt: alternative is not implemented yet : 386
-- prevent a function referenced in partition key from being dropped
^
-- partitioned table cannot participate in regular inheritance
CREATE TABLE partitioned2 (
a int,
b text
) PARTITION BY RANGE ((a+1), substr(b, 1, 5));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- partitioned table cannot participate in regular inheritance
^
CREATE TABLE fail () INHERITS (partitioned2);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE fail () INHERITS (partitioned2);
^
-- Partition key in describe output
\d partitioned
Metacommand \d partitioned is not supported
\d+ partitioned2
Metacommand \d+ partitioned2 is not supported
INSERT INTO partitioned2 VALUES (1, 'hello');
-stdin-:: Fatal: Table metadata loading
-stdin-:: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.partitioned2
CREATE TABLE part2_1 PARTITION OF partitioned2 FOR VALUES FROM (-1, 'aaaaa') TO (100, 'ccccc');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part2_1 PARTITION OF partitioned2 FOR VALUES FROM (-1, 'aaaaa') TO (100, 'ccccc');
^
\d+ part2_1
Metacommand \d+ part2_1 is not supported
DROP TABLE partitioned, partitioned2;
-- check reference to partitioned table's rowtype in partition descriptor
create table partitioned (a int, b int)
partition by list ((row(a, b)::partitioned));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- check reference to partitioned table's rowtype in partition descriptor
^
create table partitioned1
partition of partitioned for values in ('(1,2)'::partitioned);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
create table partitioned1
^
create table partitioned2
partition of partitioned for values in ('(2,4)'::partitioned);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
create table partitioned2
^
explain (costs off)
select * from partitioned where row(a,b)::partitioned = '(1,2)'::partitioned;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 276
explain (costs off)
^
drop table partitioned;
-- whole-row Var in partition key works too
create table partitioned (a int, b int)
partition by list ((partitioned));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- whole-row Var in partition key works too
^
create table partitioned1
partition of partitioned for values in ('(1,2)');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
create table partitioned1
^
create table partitioned2
partition of partitioned for values in ('(2,4)');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
create table partitioned2
^
explain (costs off)
select * from partitioned where partitioned = '(1,2)'::partitioned;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 276
explain (costs off)
^
\d+ partitioned1
Metacommand \d+ partitioned1 is not supported
drop table partitioned;
-- check that dependencies of partition columns are handled correctly
create domain intdom1 as int;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 272
-- check that dependencies of partition columns are handled correctly
^
create table partitioned (
a intdom1,
b text
) partition by range (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
create table partitioned (
^
alter table partitioned drop column a; -- fail
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: alternative is not implemented yet : 245
alter table partitioned drop column a; -- fail
^
drop domain intdom1; -- fail, requires cascade
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: DropStmt: alternative is not implemented yet : 373
drop domain intdom1; -- fail, requires cascade
^
drop domain intdom1 cascade;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: DropStmt: alternative is not implemented yet : 373
drop domain intdom1 cascade;
^
table partitioned; -- gone
-stdin-:: Fatal: Table metadata loading
-stdin-:: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.partitioned
-- likewise for columns used in partition expressions
create domain intdom1 as int;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: RawStmt: alternative is not implemented yet : 272
-- likewise for columns used in partition expressions
^
create table partitioned (
a intdom1,
b text
) partition by range (plusone(a));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
create table partitioned (
^
alter table partitioned drop column a; -- fail
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: alternative is not implemented yet : 245
alter table partitioned drop column a; -- fail
^
drop domain intdom1; -- fail, requires cascade
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: DropStmt: alternative is not implemented yet : 373
drop domain intdom1; -- fail, requires cascade
^
drop domain intdom1 cascade;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: DropStmt: alternative is not implemented yet : 373
drop domain intdom1 cascade;
^
table partitioned; -- gone
-stdin-:: Fatal: Table metadata loading
-stdin-:: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.partitioned
--
-- Partitions
--
-- check partition bound syntax
CREATE TABLE list_parted (
a int
) PARTITION BY LIST (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
--
^
CREATE TABLE part_p1 PARTITION OF list_parted FOR VALUES IN ('1');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_p1 PARTITION OF list_parted FOR VALUES IN ('1');
^
CREATE TABLE part_p2 PARTITION OF list_parted FOR VALUES IN (2);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_p2 PARTITION OF list_parted FOR VALUES IN (2);
^
CREATE TABLE part_p3 PARTITION OF list_parted FOR VALUES IN ((2+1));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_p3 PARTITION OF list_parted FOR VALUES IN ((2+1));
^
CREATE TABLE part_null PARTITION OF list_parted FOR VALUES IN (null);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_null PARTITION OF list_parted FOR VALUES IN (null);
^
\d+ list_parted
Metacommand \d+ list_parted is not supported
-- forbidden expressions for partition bound with list partitioned table
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (somename);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
-- forbidden expressions for partition bound with list partitioned table
^
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (somename.somename);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (somename.somename);
^
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (a);
^
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(a));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(a));
^
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(somename));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(somename));
^
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(1));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(1));
^
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN ((select 1));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN ((select 1));
^
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (generate_series(4, 6));
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (generate_series(4, 6));
^
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN ((1+1) collate "POSIX");
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN ((1+1) collate "POSIX");
^
-- syntax does not allow empty list of values for list partitions
CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES IN ();
-stdin-:: Error: Parse Sql
-stdin-::2:64: Error: ERROR: syntax error at or near ")"
CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES IN ();
^
-- trying to specify range for list partitioned table
CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES FROM (1) TO (2);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
-- trying to specify range for list partitioned table
^
-- trying to specify modulus and remainder for list partitioned table
CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES WITH (MODULUS 10, REMAINDER 1);
-stdin-:: Error: Parse Sql
-stdin-::2:66: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES WITH (MODULUS 10, REMAINDER 1);
^
-- check default partition cannot be created more than once
CREATE TABLE part_default PARTITION OF list_parted DEFAULT;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
-- check default partition cannot be created more than once
^
CREATE TABLE fail_default_part PARTITION OF list_parted DEFAULT;
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE fail_default_part PARTITION OF list_parted DEFAULT;
^
-- specified literal can't be cast to the partition column data type
CREATE TABLE bools (
a bool
) PARTITION BY LIST (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- specified literal can't be cast to the partition column data type
^
CREATE TABLE bools_true PARTITION OF bools FOR VALUES IN (1);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE bools_true PARTITION OF bools FOR VALUES IN (1);
^
DROP TABLE bools;
-- specified literal can be cast, and the cast might not be immutable
CREATE TABLE moneyp (
a money
) PARTITION BY LIST (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- specified literal can be cast, and the cast might not be immutable
^
CREATE TABLE moneyp_10 PARTITION OF moneyp FOR VALUES IN (10);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE moneyp_10 PARTITION OF moneyp FOR VALUES IN (10);
^
CREATE TABLE moneyp_11 PARTITION OF moneyp FOR VALUES IN ('11');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE moneyp_11 PARTITION OF moneyp FOR VALUES IN ('11');
^
CREATE TABLE moneyp_12 PARTITION OF moneyp FOR VALUES IN (to_char(12, '99')::int);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE moneyp_12 PARTITION OF moneyp FOR VALUES IN (to_char(12, '99')::int);
^
DROP TABLE moneyp;
-- cast is immutable
CREATE TABLE bigintp (
a bigint
) PARTITION BY LIST (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
-- cast is immutable
^
CREATE TABLE bigintp_10 PARTITION OF bigintp FOR VALUES IN (10);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE bigintp_10 PARTITION OF bigintp FOR VALUES IN (10);
^
-- fails due to overlap:
CREATE TABLE bigintp_10_2 PARTITION OF bigintp FOR VALUES IN ('10');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
-- fails due to overlap:
^
DROP TABLE bigintp;
CREATE TABLE range_parted (
a date
) PARTITION BY RANGE (a);
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: PARTITION BY clause not supported
CREATE TABLE range_parted (
^
-- forbidden expressions for partition bounds with range partitioned table
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
FOR VALUES FROM (somename) TO ('2019-01-01');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
-- forbidden expressions for partition bounds with range partitioned table
^
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
FOR VALUES FROM (somename.somename) TO ('2019-01-01');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
^
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
FOR VALUES FROM (a) TO ('2019-01-01');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
^
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
FOR VALUES FROM (max(a)) TO ('2019-01-01');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
^
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
FOR VALUES FROM (max(somename)) TO ('2019-01-01');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
^
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
FOR VALUES FROM (max('2019-02-01'::date)) TO ('2019-01-01');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
^
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
FOR VALUES FROM ((select 1)) TO ('2019-01-01');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
^
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
FOR VALUES FROM (generate_series(1, 3)) TO ('2019-01-01');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
^
-- trying to specify list for range partitioned table
CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES IN ('a');
-stdin-:: Error: Parse Sql
-stdin-::1:1: Error: table inheritance not supported
-- trying to specify list for range partitioned table
^
-- trying to specify modulus and remainder for range partitioned table
CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES WITH (MODULUS 10, REMAINDER 1);
-stdin-:: Error: Parse Sql
-stdin-::2:67: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES WITH (MODULUS 10, REMAINDER 1);
^