Skip to content

Commit 728015a

Browse files
committed
Fix table name clash in recently introduced test
A few buildfarm animals recently started complaining about the "child" relation already existing. e056c55 added a new child table to inherit.sql, but triggers.sql, running in the same parallel group, also uses a child table. Rename the new table to inh_child. It maybe worth renaming child, parent in other tests as well, but that's work for another day. Discussion: https://postgr.es/m/20230407204530.52q3v5cu5x6dj676@awork3.anarazel.de
1 parent 704261e commit 728015a

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/test/regress/expected/inherit.out

+8-8
Original file line numberDiff line numberDiff line change
@@ -2185,23 +2185,23 @@ drop cascades to table d1
21852185
-- with explicitly specified not null constraints
21862186
create table inh_parent_1(f1 int);
21872187
create table inh_parent_2(f2 text);
2188-
create table child(f1 int not null, f2 text not null) inherits(inh_parent_1, inh_parent_2);
2188+
create table inh_child(f1 int not null, f2 text not null) inherits(inh_parent_1, inh_parent_2);
21892189
NOTICE: merging column "f1" with inherited definition
21902190
NOTICE: merging column "f2" with inherited definition
21912191
-- show constraint info
21922192
select conrelid::regclass, conname, contype, coninhcount, conislocal
21932193
from pg_constraint where contype = 'n' and
2194-
conrelid in ('inh_parent_1'::regclass, 'inh_parent_2'::regclass, 'child'::regclass)
2194+
conrelid in ('inh_parent_1'::regclass, 'inh_parent_2'::regclass, 'inh_child'::regclass)
21952195
order by 2, 1;
2196-
conrelid | conname | contype | coninhcount | conislocal
2197-
----------+-------------------+---------+-------------+------------
2198-
child | child_f1_not_null | n | 0 | t
2199-
child | child_f2_not_null | n | 0 | t
2196+
conrelid | conname | contype | coninhcount | conislocal
2197+
-----------+-----------------------+---------+-------------+------------
2198+
inh_child | inh_child_f1_not_null | n | 0 | t
2199+
inh_child | inh_child_f2_not_null | n | 0 | t
22002200
(2 rows)
22012201

2202-
-- also drops child table
2202+
-- also drops inh_child table
22032203
drop table inh_parent_1 cascade;
2204-
NOTICE: drop cascades to table child
2204+
NOTICE: drop cascades to table inh_child
22052205
drop table inh_parent_2;
22062206
-- test multi layer inheritance tree
22072207
create table inh_p1(f1 int not null);

src/test/regress/sql/inherit.sql

+3-3
Original file line numberDiff line numberDiff line change
@@ -848,15 +848,15 @@ drop table inh_parent cascade;
848848
-- with explicitly specified not null constraints
849849
create table inh_parent_1(f1 int);
850850
create table inh_parent_2(f2 text);
851-
create table child(f1 int not null, f2 text not null) inherits(inh_parent_1, inh_parent_2);
851+
create table inh_child(f1 int not null, f2 text not null) inherits(inh_parent_1, inh_parent_2);
852852

853853
-- show constraint info
854854
select conrelid::regclass, conname, contype, coninhcount, conislocal
855855
from pg_constraint where contype = 'n' and
856-
conrelid in ('inh_parent_1'::regclass, 'inh_parent_2'::regclass, 'child'::regclass)
856+
conrelid in ('inh_parent_1'::regclass, 'inh_parent_2'::regclass, 'inh_child'::regclass)
857857
order by 2, 1;
858858

859-
-- also drops child table
859+
-- also drops inh_child table
860860
drop table inh_parent_1 cascade;
861861
drop table inh_parent_2;
862862

0 commit comments

Comments
 (0)