From 1d3fd00e4de01ac34fae9f93febc92b6ba156648 Mon Sep 17 00:00:00 2001 From: Tomas Vondra Date: Wed, 18 Oct 2017 16:55:40 +0200 Subject: 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. --- src/test/regress/expected/updatable_views.out | 10 +++++----- src/test/regress/sql/updatable_views.sql | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') 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); -- cgit v1.2.3