@@ -8,8 +8,8 @@ SELECT plan(102);
88SET  client_min_messages =  warning;
99
1010--  Create inherited tables (not partitions).
11- CREATE  TABLE  public .parent (id INT  PRIMARY KEY );
12- CREATE  TABLE  public .child (id INT  PRIMARY KEY ) INHERITS (public .parent );
11+ CREATE  TABLE  public .base (id INT  PRIMARY KEY );
12+ CREATE  TABLE  public .sub (id INT  PRIMARY KEY ) INHERITS (public .base );
1313
1414--  Create a partitioned table with two partitions.
1515CREATE  TABLE  public .parted(id INT  NOT NULL ) PARTITION BY RANGE (id);
@@ -67,49 +67,49 @@ SELECT * FROM check_test(
6767
6868--  is_partition_of() should fail for inherited but not partitioned tables.
6969SELECT  *  FROM  check_test(
70-     is_partition_of( ' public'  , ' child '  , ' public'  , ' parent '  , ' whatevs'   ),
70+     is_partition_of( ' public'  , ' sub '  , ' public'  , ' base '  , ' whatevs'   ),
7171    false,
7272    ' is_partition_of( csch, non-part ctab, psch, non-part ptab, desc )'  ,
7373    ' whatevs'  ,
7474    ' ' 
7575);
7676
7777SELECT  *  FROM  check_test(
78-     is_partition_of( ' child '  , ' parent '  , ' whatevs'   ),
78+     is_partition_of( ' sub '  , ' base '  , ' whatevs'   ),
7979    false,
8080    ' is_partition_of( non-part ctab, non-part ptab, desc )'  ,
8181    ' whatevs'  ,
8282    ' ' 
8383);
8484
85- --  is_partition_of() should fail for parted table and non-part child .
85+ --  is_partition_of() should fail for parted table and non-part sub .
8686SELECT  *  FROM  check_test(
87-     is_partition_of( ' public'  , ' child '  , ' public'  , ' parted'  , ' whatevs'   ),
87+     is_partition_of( ' public'  , ' sub '  , ' public'  , ' parted'  , ' whatevs'   ),
8888    false,
8989    ' is_partition_of( csch, non-part ctab, psch, ptab, desc )'  ,
9090    ' whatevs'  ,
9191    ' ' 
9292);
9393
9494SELECT  *  FROM  check_test(
95-     is_partition_of( ' child '  , ' parted'  , ' whatevs'   ),
95+     is_partition_of( ' sub '  , ' parted'  , ' whatevs'   ),
9696    false,
9797    ' is_partition_of( non-part ctab, ptab, desc )'  ,
9898    ' whatevs'  ,
9999    ' ' 
100100);
101101
102- --  is_partition_of() should fail for partition child  but wrong parent .
102+ --  is_partition_of() should fail for partition sub  but wrong base .
103103SELECT  *  FROM  check_test(
104-     is_partition_of( ' public'  , ' part1'  , ' public'  , ' parent '  , ' whatevs'   ),
104+     is_partition_of( ' public'  , ' part1'  , ' public'  , ' base '  , ' whatevs'   ),
105105    false,
106106    ' is_partition_of( csch, ctab, psch, non-part ptab, desc )'  ,
107107    ' whatevs'  ,
108108    ' ' 
109109);
110110
111111SELECT  *  FROM  check_test(
112-     is_partition_of( ' part1'  , ' parent '  , ' whatevs'   ),
112+     is_partition_of( ' part1'  , ' base '  , ' whatevs'   ),
113113    false,
114114    ' is_partition_of( ctab, non-part ptab, desc )'  ,
115115    ' whatevs'  ,
@@ -152,7 +152,7 @@ SELECT * FROM check_test(
152152    ' ' 
153153);
154154
155- --  Should find public partition for hidden parent .
155+ --  Should find public partition for hidden base .
156156SELECT  *  FROM  check_test(
157157    is_partition_of( ' public'  , ' not_hidden_part3'  , ' hide'  , ' hidden_parted'  , ' whatevs'   ),
158158    true,
@@ -307,21 +307,21 @@ SELECT * FROM check_test(
307307
308308--  Should not work for unpartitioned but inherited table
309309SELECT  *  FROM  check_test(
310-     partitions_are( ' public'  , ' parent '  , ' {child }'  , ' hi'   ),
310+     partitions_are( ' public'  , ' base '  , ' {sub }'  , ' hi'   ),
311311    false,
312312    ' partitions_are( sch, non-parted tab, inherited tab, desc )'  ,
313313    ' hi'  ,
314314    '     Missing partitions:
315-         child '  
315+         sub '  
316316);
317317
318318SELECT  *  FROM  check_test(
319-     partitions_are( ' parent '  , ' {child }'  ::name[], ' hi'   ),
319+     partitions_are( ' base '  , ' {sub }'  ::name[], ' hi'   ),
320320    false,
321321    ' partitions_are( non-parted tab, inherited tab, desc )'  ,
322322    ' hi'  ,
323323    '     Missing partitions:
324-         child '  
324+         sub '  
325325);
326326
327327--  Should not work for non-existent table.
0 commit comments