summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Vondra2017-10-18 14:55:40 +0000
committerTomas Vondra2017-10-19 13:49:08 +0000
commit1d3fd00e4de01ac34fae9f93febc92b6ba156648 (patch)
tree0f89db20b766cf13f5d83df6d3d3e89f3b05aa32
parentb7ab508b85a00dabff8beaa14af7121ab00b42cb (diff)
Fix failures in updatable_views due to different structure
Since commit 93cbab90b0c6fc3fc4aa515b93057127c0ee8a1b we enforce stricter rules on structure of partitioned tables, e.g. we do not allow different order of columns in parent/child tables. This was causing failures in the updatable_views tests, so fix that by ensuring the structure actually matches exactly.
-rw-r--r--src/test/regress/expected/updatable_views.out10
-rw-r--r--src/test/regress/sql/updatable_views.sql10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/test/regress/expected/updatable_views.out b/src/test/regress/expected/updatable_views.out
index 3797dd2b7d..1ce6c536c4 100644
--- a/src/test/regress/expected/updatable_views.out
+++ b/src/test/regress/expected/updatable_views.out
@@ -2323,12 +2323,12 @@ DROP VIEW v1;
DROP TABLE t1;
-- check that an auto-updatable view on a partitioned table works correctly
create table pt (a int, b int, v varchar) partition by range (a, b);
-create table pt1 (b int not null, v varchar, a int not null) partition by range (b);
+create table pt1 (a int not null, b int not null, v varchar) 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 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;
diff --git a/src/test/regress/sql/updatable_views.sql b/src/test/regress/sql/updatable_views.sql
index 2e28854c0c..8f3cbddc7a 100644
--- a/src/test/regress/sql/updatable_views.sql
+++ b/src/test/regress/sql/updatable_views.sql
@@ -1115,12 +1115,12 @@ DROP TABLE t1;
-- check that an auto-updatable view on a partitioned table works correctly
create table pt (a int, b int, v varchar) partition by range (a, b);
-create table pt1 (b int not null, v varchar, a int not null) partition by range (b);
+create table pt1 (a int not null, b int not null, v varchar) 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 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);