diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-01-24 19:02:13 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-01-24 19:02:22 -0500 |
commit | 7fa7bf18e493e130147e62cf7dc33010f164126c (patch) | |
tree | 19df906992b58bef1bc36cbade7ac4192b089544 /src | |
parent | da4d1c0c15ab9afdfeee8bad9a1a9989b6bd59b5 (diff) | |
download | postgresql-7fa7bf18e493e130147e62cf7dc33010f164126c.tar.gz postgresql-7fa7bf18e493e130147e62cf7dc33010f164126c.zip |
Use non-conflicting table names in new regression test case.
Commit 587cda35c 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.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/regress/expected/updatable_views.out | 36 | ||||
-rw-r--r-- | src/test/regress/sql/updatable_views.sql | 34 |
2 files changed, 35 insertions, 35 deletions
diff --git a/src/test/regress/expected/updatable_views.out b/src/test/regress/expected/updatable_views.out index 2ae3613cec0..aa06d1d454e 100644 --- a/src/test/regress/expected/updatable_views.out +++ b/src/test/regress/expected/updatable_views.out @@ -2368,26 +2368,26 @@ DETAIL: Failing row contains (-1, invalid). DROP VIEW v1; DROP TABLE t1; -- check that an auto-updatable view on a partitioned table works correctly -create table p (a int, b int) partition by range (a, b); -create table p1 (b int not null, a int not null) partition by range (b); -create table p11 (like p1); -alter table p11 drop a; -alter table p11 add a int; -alter table p11 drop a; -alter table p11 add a int not null; -alter table p1 attach partition p11 for values from (2) to (5); -alter table p attach partition p1 for values from (1, 2) to (1, 10); -create view pv as select * from p; -insert into pv values (1, 2); -select tableoid::regclass, * from p; +create table pt (a int, b int) partition by range (a, b); +create table pt1 (b int not null, a int not null) partition by range (b); +create table pt11 (like pt1); +alter table pt11 drop a; +alter table pt11 add a int; +alter table pt11 drop a; +alter table pt11 add a int not null; +alter table pt1 attach partition pt11 for values from (2) to (5); +alter table pt attach partition pt1 for values from (1, 2) to (1, 10); +create view ptv as select * from pt; +insert into ptv values (1, 2); +select tableoid::regclass, * from pt; tableoid | a | b ----------+---+--- - p11 | 1 | 2 + pt11 | 1 | 2 (1 row) -create view pv_wco as select * from p where a = 0 with check option; -insert into pv_wco values (1, 2); -ERROR: new row violates check option for view "pv_wco" +create view ptv_wco as select * from pt where a = 0 with check option; +insert into ptv_wco values (1, 2); +ERROR: new row violates check option for view "ptv_wco" DETAIL: Failing row contains (2, 1). -drop view pv, pv_wco; -drop table p, p1, p11; +drop view ptv, ptv_wco; +drop table pt, pt1, pt11; diff --git a/src/test/regress/sql/updatable_views.sql b/src/test/regress/sql/updatable_views.sql index 3c19edc8f7e..d89062c3b13 100644 --- a/src/test/regress/sql/updatable_views.sql +++ b/src/test/regress/sql/updatable_views.sql @@ -1114,20 +1114,20 @@ DROP VIEW v1; DROP TABLE t1; -- check that an auto-updatable view on a partitioned table works correctly -create table p (a int, b int) partition by range (a, b); -create table p1 (b int not null, a int not null) partition by range (b); -create table p11 (like p1); -alter table p11 drop a; -alter table p11 add a int; -alter table p11 drop a; -alter table p11 add a int not null; -alter table p1 attach partition p11 for values from (2) to (5); -alter table p attach partition p1 for values from (1, 2) to (1, 10); - -create view pv as select * from p; -insert into pv values (1, 2); -select tableoid::regclass, * from p; -create view pv_wco as select * from p where a = 0 with check option; -insert into pv_wco values (1, 2); -drop view pv, pv_wco; -drop table p, p1, p11; +create table pt (a int, b int) partition by range (a, b); +create table pt1 (b int not null, a int not null) partition by range (b); +create table pt11 (like pt1); +alter table pt11 drop a; +alter table pt11 add a int; +alter table pt11 drop a; +alter table pt11 add a int not null; +alter table pt1 attach partition pt11 for values from (2) to (5); +alter table pt attach partition pt1 for values from (1, 2) to (1, 10); + +create view ptv as select * from pt; +insert into ptv values (1, 2); +select tableoid::regclass, * from pt; +create view ptv_wco as select * from pt where a = 0 with check option; +insert into ptv_wco values (1, 2); +drop view ptv, ptv_wco; +drop table pt, pt1, pt11; |