diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/create_table.out | 10 | ||||
| -rw-r--r-- | src/test/regress/sql/create_table.sql | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out index 284a7fb85c8..c45e02d42f9 100644 --- a/src/test/regress/expected/create_table.out +++ b/src/test/regress/expected/create_table.out @@ -50,6 +50,16 @@ ERROR: cannot create temporary relation in non-temporary schema LINE 1: CREATE TEMP TABLE public.temp_to_perm (a int primary key); ^ DROP TABLE unlogged1, public.unlogged2; +CREATE UNLOGGED TABLE unlogged1 (a int) PARTITION BY RANGE (a); -- fail +ERROR: partitioned tables cannot be unlogged +CREATE TABLE unlogged1 (a int) PARTITION BY RANGE (a); -- ok +ALTER TABLE unlogged1 SET LOGGED; -- fails +ERROR: ALTER action SET LOGGED cannot be performed on relation "unlogged1" +DETAIL: This operation is not supported for partitioned tables. +ALTER TABLE unlogged1 SET UNLOGGED; -- fails +ERROR: ALTER action SET UNLOGGED cannot be performed on relation "unlogged1" +DETAIL: This operation is not supported for partitioned tables. +DROP TABLE unlogged1; CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r'; CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r'; ERROR: relation "as_select1" already exists diff --git a/src/test/regress/sql/create_table.sql b/src/test/regress/sql/create_table.sql index 1fd4cbfa7ef..37a227148e9 100644 --- a/src/test/regress/sql/create_table.sql +++ b/src/test/regress/sql/create_table.sql @@ -30,6 +30,12 @@ CREATE TEMP TABLE pg_temp.doubly_temp (a int primary key); -- also OK CREATE TEMP TABLE public.temp_to_perm (a int primary key); -- not OK DROP TABLE unlogged1, public.unlogged2; +CREATE UNLOGGED TABLE unlogged1 (a int) PARTITION BY RANGE (a); -- fail +CREATE TABLE unlogged1 (a int) PARTITION BY RANGE (a); -- ok +ALTER TABLE unlogged1 SET LOGGED; -- fails +ALTER TABLE unlogged1 SET UNLOGGED; -- fails +DROP TABLE unlogged1; + CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r'; 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'; |
