You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3502,44 +3506,47 @@ ALTER TABLE old_system_table DROP COLUMN othercol;
3502
3506
DROP TABLE old_system_table;
3503
3507
-- set logged
3504
3508
CREATE UNLOGGED TABLE unlogged1(f1 SERIAL PRIMARY KEY, f2 TEXT);
3509
+
ERROR: unlogged sequences are not supported
3505
3510
-- check relpersistence of an unlogged table
3506
3511
SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~ '^unlogged1'
3507
3512
UNION ALL
3508
3513
SELECT 'toast table', t.relkind, t.relpersistence FROM pg_class r JOIN pg_class t ON t.oid = r.reltoastrelid WHERE r.relname ~ '^unlogged1'
3509
3514
UNION ALL
3510
3515
SELECT 'toast index', ri.relkind, ri.relpersistence FROM pg_class r join pg_class t ON t.oid = r.reltoastrelid JOIN pg_index i ON i.indrelid = t.oid JOIN pg_class ri ON ri.oid = i.indexrelid WHERE r.relname ~ '^unlogged1'
ALTER TABLE unlogged3 SET LOGGED; -- skip self-referencing foreign key
3526
+
ERROR: relation "unlogged3" does not exist
3522
3527
ALTER TABLE unlogged2 SET LOGGED; -- fails because a foreign key to an unlogged table exists
3523
-
ERROR: could not change table "unlogged2" to logged because it references unlogged table "unlogged1"
3528
+
ERROR: relation "unlogged2" does not exist
3524
3529
ALTER TABLE unlogged1 SET LOGGED;
3530
+
ERROR: relation "unlogged1" does not exist
3525
3531
-- check relpersistence of an unlogged table after changing to permanent
3526
3532
SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~ '^unlogged1'
3527
3533
UNION ALL
3528
3534
SELECT 'toast table', t.relkind, t.relpersistence FROM pg_class r JOIN pg_class t ON t.oid = r.reltoastrelid WHERE r.relname ~ '^unlogged1'
3529
3535
UNION ALL
3530
3536
SELECT 'toast index', ri.relkind, ri.relpersistence FROM pg_class r join pg_class t ON t.oid = r.reltoastrelid JOIN pg_index i ON i.indrelid = t.oid JOIN pg_class ri ON ri.oid = i.indexrelid WHERE r.relname ~ '^unlogged1'
3531
3537
ORDER BY relname;
3532
-
relname | relkind | relpersistence
3533
-
------------------+---------+----------------
3534
-
unlogged1 | r | p
3535
-
unlogged1_f1_seq | S | p
3536
-
unlogged1_pkey | i | p
3537
-
(3 rows)
3538
+
relname | relkind | relpersistence
3539
+
---------+---------+----------------
3540
+
(0 rows)
3538
3541
3539
3542
ALTER TABLE unlogged1 SET LOGGED; -- silently do nothing
3543
+
ERROR: relation "unlogged1" does not exist
3540
3544
DROP TABLE unlogged3;
3545
+
ERROR: table "unlogged3" does not exist
3541
3546
DROP TABLE unlogged2;
3547
+
ERROR: table "unlogged2" does not exist
3542
3548
DROP TABLE unlogged1;
3549
+
ERROR: table "unlogged1" does not exist
3543
3550
-- set unlogged
3544
3551
CREATE TABLE logged1(f1 SERIAL PRIMARY KEY, f2 TEXT);
3545
3552
-- check relpersistence of a permanent table
@@ -3573,7 +3580,7 @@ ORDER BY relname;
3573
3580
relname | relkind | relpersistence
3574
3581
----------------+---------+----------------
3575
3582
logged1 | r | u
3576
-
logged1_f1_seq | S | p
3583
+
logged1_f1_seq | S | u
3577
3584
logged1_pkey | i | u
3578
3585
(3 rows)
3579
3586
@@ -4240,7 +4247,8 @@ DROP TABLE fail_part;
4240
4247
-- fails with incorrect object type
4241
4248
CREATE VIEW at_v1 AS SELECT 1 as a;
4242
4249
ALTER TABLE at_v1 ATTACH PARTITION dummy default;
4243
-
ERROR: "at_v1" is not a table or partitioned index
4250
+
ERROR: ALTER action ATTACH PARTITION cannot be performed on relation "at_v1"
4251
+
DETAIL: This operation is not supported for views.
0 commit comments