Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7fa7bf1

Browse files
committed
Use non-conflicting table names in new regression test case.
Commit 587cda3 added a test to updatable_views.sql that created tables named the same as tables used by the concurrent inherit.sql script. Unsurprisingly, this results in random failures. Pick different names. Per buildfarm.
1 parent da4d1c0 commit 7fa7bf1

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed

src/test/regress/expected/updatable_views.out

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,26 +2368,26 @@ DETAIL: Failing row contains (-1, invalid).
23682368
DROP VIEW v1;
23692369
DROP TABLE t1;
23702370
-- check that an auto-updatable view on a partitioned table works correctly
2371-
create table p (a int, b int) partition by range (a, b);
2372-
create table p1 (b int not null, a int not null) partition by range (b);
2373-
create table p11 (like p1);
2374-
alter table p11 drop a;
2375-
alter table p11 add a int;
2376-
alter table p11 drop a;
2377-
alter table p11 add a int not null;
2378-
alter table p1 attach partition p11 for values from (2) to (5);
2379-
alter table p attach partition p1 for values from (1, 2) to (1, 10);
2380-
create view pv as select * from p;
2381-
insert into pv values (1, 2);
2382-
select tableoid::regclass, * from p;
2371+
create table pt (a int, b int) partition by range (a, b);
2372+
create table pt1 (b int not null, a int not null) partition by range (b);
2373+
create table pt11 (like pt1);
2374+
alter table pt11 drop a;
2375+
alter table pt11 add a int;
2376+
alter table pt11 drop a;
2377+
alter table pt11 add a int not null;
2378+
alter table pt1 attach partition pt11 for values from (2) to (5);
2379+
alter table pt attach partition pt1 for values from (1, 2) to (1, 10);
2380+
create view ptv as select * from pt;
2381+
insert into ptv values (1, 2);
2382+
select tableoid::regclass, * from pt;
23832383
tableoid | a | b
23842384
----------+---+---
2385-
p11 | 1 | 2
2385+
pt11 | 1 | 2
23862386
(1 row)
23872387

2388-
create view pv_wco as select * from p where a = 0 with check option;
2389-
insert into pv_wco values (1, 2);
2390-
ERROR: new row violates check option for view "pv_wco"
2388+
create view ptv_wco as select * from pt where a = 0 with check option;
2389+
insert into ptv_wco values (1, 2);
2390+
ERROR: new row violates check option for view "ptv_wco"
23912391
DETAIL: Failing row contains (2, 1).
2392-
drop view pv, pv_wco;
2393-
drop table p, p1, p11;
2392+
drop view ptv, ptv_wco;
2393+
drop table pt, pt1, pt11;

src/test/regress/sql/updatable_views.sql

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,20 +1114,20 @@ DROP VIEW v1;
11141114
DROP TABLE t1;
11151115

11161116
-- check that an auto-updatable view on a partitioned table works correctly
1117-
create table p (a int, b int) partition by range (a, b);
1118-
create table p1 (b int not null, a int not null) partition by range (b);
1119-
create table p11 (like p1);
1120-
alter table p11 drop a;
1121-
alter table p11 add a int;
1122-
alter table p11 drop a;
1123-
alter table p11 add a int not null;
1124-
alter table p1 attach partition p11 for values from (2) to (5);
1125-
alter table p attach partition p1 for values from (1, 2) to (1, 10);
1126-
1127-
create view pv as select * from p;
1128-
insert into pv values (1, 2);
1129-
select tableoid::regclass, * from p;
1130-
create view pv_wco as select * from p where a = 0 with check option;
1131-
insert into pv_wco values (1, 2);
1132-
drop view pv, pv_wco;
1133-
drop table p, p1, p11;
1117+
create table pt (a int, b int) partition by range (a, b);
1118+
create table pt1 (b int not null, a int not null) partition by range (b);
1119+
create table pt11 (like pt1);
1120+
alter table pt11 drop a;
1121+
alter table pt11 add a int;
1122+
alter table pt11 drop a;
1123+
alter table pt11 add a int not null;
1124+
alter table pt1 attach partition pt11 for values from (2) to (5);
1125+
alter table pt attach partition pt1 for values from (1, 2) to (1, 10);
1126+
1127+
create view ptv as select * from pt;
1128+
insert into ptv values (1, 2);
1129+
select tableoid::regclass, * from pt;
1130+
create view ptv_wco as select * from pt where a = 0 with check option;
1131+
insert into ptv_wco values (1, 2);
1132+
drop view ptv, ptv_wco;
1133+
drop table pt, pt1, pt11;

0 commit comments

Comments
 (0)