Hi, I noticed that the test alter_table.sql is creating two tables tab1 and tab2 and it's not dropping it. Any test which follows this test and tries to create tables with names tab1 and tab2 will fail (unless it drops those tables first, but that may not work, since tab2.y depends upon tab1 in alter_table.sql).
PFA patch which drops these two tables from alter_table.sql and corresponding OUT change. The regression run clean with this patch. -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index 9ab84f9..4f626dd 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -1503,20 +1503,22 @@ select * from another; two more | 20 three more | 30 (3 rows) drop table another; -- table's row type create table tab1 (a int, b text); create table tab2 (x int, y tab1); alter table tab1 alter column b type varchar; -- fails ERROR: cannot alter table "tab1" because column "tab2.y" uses its row type +drop table tab2; +drop table tab1; -- disallow recursive containment of row types create temp table recur1 (f1 int); alter table recur1 add column f2 recur1; -- fails ERROR: composite type recur1 cannot be made a member of itself alter table recur1 add column f2 recur1[]; -- fails ERROR: composite type recur1 cannot be made a member of itself create domain array_of_recur1 as recur1[]; alter table recur1 add column f2 array_of_recur1; -- fails ERROR: composite type recur1 cannot be made a member of itself create temp table recur2 (f1 int, f2 recur1); diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql index b5d76ea..9d5ec63 100644 --- a/src/test/regress/sql/alter_table.sql +++ b/src/test/regress/sql/alter_table.sql @@ -1116,20 +1116,22 @@ alter table another alter f2 type bigint using f1 * 10; select * from another; drop table another; -- table's row type create table tab1 (a int, b text); create table tab2 (x int, y tab1); alter table tab1 alter column b type varchar; -- fails +drop table tab2; +drop table tab1; -- disallow recursive containment of row types create temp table recur1 (f1 int); alter table recur1 add column f2 recur1; -- fails alter table recur1 add column f2 recur1[]; -- fails create domain array_of_recur1 as recur1[]; alter table recur1 add column f2 array_of_recur1; -- fails create temp table recur2 (f1 int, f2 recur1); alter table recur1 add column f2 recur2; -- fails alter table recur1 add column f2 int;
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers