aboutsummaryrefslogtreecommitdiff
path: root/src/test/regress/sql/alter_table.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/regress/sql/alter_table.sql')
-rw-r--r--src/test/regress/sql/alter_table.sql12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql
index b81bf25d2dc..5f06a768545 100644
--- a/src/test/regress/sql/alter_table.sql
+++ b/src/test/regress/sql/alter_table.sql
@@ -1293,12 +1293,19 @@ select * from anothertab;
drop table anothertab;
--- Test alter table column type with constraint indexes (cf. bug #15835)
-create table anothertab(f1 int primary key, f2 int unique, f3 int, f4 int);
+-- Test index handling in alter table column type (cf. bugs #15835, #15865)
+create table anothertab(f1 int primary key, f2 int unique,
+ f3 int, f4 int, f5 int);
alter table anothertab
add exclude using btree (f3 with =);
alter table anothertab
add exclude using btree (f4 with =) where (f4 is not null);
+alter table anothertab
+ add exclude using btree (f4 with =) where (f5 > 0);
+alter table anothertab
+ add unique(f1,f4);
+create index on anothertab(f2,f3);
+create unique index on anothertab(f4);
\d anothertab
alter table anothertab alter column f1 type bigint;
@@ -1306,6 +1313,7 @@ alter table anothertab
alter column f2 type bigint,
alter column f3 type bigint,
alter column f4 type bigint;
+alter table anothertab alter column f5 type bigint;
\d anothertab
drop table anothertab;