diff --git a/src/test/regress/expected/aggregates.out b/src/test/regress/expected/aggregates.out
index 3408cf3..ae935b4 100644
--- a/src/test/regress/expected/aggregates.out
+++ b/src/test/regress/expected/aggregates.out
@@ -584,12 +584,12 @@ FROM bool_test;
 -- Basic cases
 explain (costs off)
   select min(unique1) from tenk1;
-                         QUERY PLAN                         
-------------------------------------------------------------
+                         QUERY PLAN                          
+-------------------------------------------------------------
  Result
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan using tenk1_unique1 on tenk1
+           ->  Index Only Scan using tenk1_unique1 on tenk1a
                  Index Cond: (unique1 IS NOT NULL)
 (5 rows)
 
@@ -601,12 +601,12 @@ select min(unique1) from tenk1;
 
 explain (costs off)
   select max(unique1) from tenk1;
-                             QUERY PLAN                              
----------------------------------------------------------------------
+                              QUERY PLAN                              
+----------------------------------------------------------------------
  Result
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan Backward using tenk1_unique1 on tenk1
+           ->  Index Only Scan Backward using tenk1_unique1 on tenk1a
                  Index Cond: (unique1 IS NOT NULL)
 (5 rows)
 
@@ -623,7 +623,7 @@ explain (costs off)
  Result
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan Backward using tenk1_unique1 on tenk1
+           ->  Index Only Scan Backward using tenk1_unique1 on tenk1a
                  Index Cond: ((unique1 IS NOT NULL) AND (unique1 < 42))
 (5 rows)
 
@@ -640,7 +640,7 @@ explain (costs off)
  Result
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan Backward using tenk1_unique1 on tenk1
+           ->  Index Only Scan Backward using tenk1_unique1 on tenk1a
                  Index Cond: ((unique1 IS NOT NULL) AND (unique1 > 42))
 (5 rows)
 
@@ -663,7 +663,7 @@ explain (costs off)
  Result
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan Backward using tenk1_unique1 on tenk1
+           ->  Index Only Scan Backward using tenk1_unique1 on tenk1a
                  Index Cond: ((unique1 IS NOT NULL) AND (unique1 > 42000))
 (5 rows)
 
@@ -677,12 +677,12 @@ rollback;
 -- multi-column index (uses tenk1_thous_tenthous)
 explain (costs off)
   select max(tenthous) from tenk1 where thousand = 33;
-                                 QUERY PLAN                                 
-----------------------------------------------------------------------------
+                                 QUERY PLAN                                  
+-----------------------------------------------------------------------------
  Result
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan Backward using tenk1_thous_tenthous on tenk1
+           ->  Index Only Scan Backward using tenk1_thous_tenthous on tenk1a
                  Index Cond: ((thousand = 33) AND (tenthous IS NOT NULL))
 (5 rows)
 
@@ -699,7 +699,7 @@ explain (costs off)
  Result
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan using tenk1_thous_tenthous on tenk1
+           ->  Index Only Scan using tenk1_thous_tenthous on tenk1a
                  Index Cond: ((thousand = 33) AND (tenthous IS NOT NULL))
 (5 rows)
 
@@ -720,7 +720,7 @@ explain (costs off)
      ->  Result
            InitPlan 1 (returns $1)
              ->  Limit
-                   ->  Index Only Scan using tenk1_unique1 on tenk1
+                   ->  Index Only Scan using tenk1_unique1 on tenk1a
                          Index Cond: ((unique1 IS NOT NULL) AND (unique1 > int4_tbl.f1))
 (7 rows)
 
@@ -738,13 +738,13 @@ select f1, (select min(unique1) from tenk1 where unique1 > f1) AS gt
 -- check some cases that were handled incorrectly in 8.3.0
 explain (costs off)
   select distinct max(unique2) from tenk1;
-                             QUERY PLAN                              
----------------------------------------------------------------------
+                              QUERY PLAN                              
+----------------------------------------------------------------------
  HashAggregate
    Group Key: $0
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan Backward using tenk1_unique2 on tenk1
+           ->  Index Only Scan Backward using tenk1_unique2 on tenk1a
                  Index Cond: (unique2 IS NOT NULL)
    ->  Result
 (7 rows)
@@ -757,13 +757,13 @@ select distinct max(unique2) from tenk1;
 
 explain (costs off)
   select max(unique2) from tenk1 order by 1;
-                             QUERY PLAN                              
----------------------------------------------------------------------
+                              QUERY PLAN                              
+----------------------------------------------------------------------
  Sort
    Sort Key: ($0)
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan Backward using tenk1_unique2 on tenk1
+           ->  Index Only Scan Backward using tenk1_unique2 on tenk1a
                  Index Cond: (unique2 IS NOT NULL)
    ->  Result
 (7 rows)
@@ -776,13 +776,13 @@ select max(unique2) from tenk1 order by 1;
 
 explain (costs off)
   select max(unique2) from tenk1 order by max(unique2);
-                             QUERY PLAN                              
----------------------------------------------------------------------
+                              QUERY PLAN                              
+----------------------------------------------------------------------
  Sort
    Sort Key: ($0)
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan Backward using tenk1_unique2 on tenk1
+           ->  Index Only Scan Backward using tenk1_unique2 on tenk1a
                  Index Cond: (unique2 IS NOT NULL)
    ->  Result
 (7 rows)
@@ -795,13 +795,13 @@ select max(unique2) from tenk1 order by max(unique2);
 
 explain (costs off)
   select max(unique2) from tenk1 order by max(unique2)+1;
-                             QUERY PLAN                              
----------------------------------------------------------------------
+                              QUERY PLAN                              
+----------------------------------------------------------------------
  Sort
    Sort Key: (($0 + 1))
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan Backward using tenk1_unique2 on tenk1
+           ->  Index Only Scan Backward using tenk1_unique2 on tenk1a
                  Index Cond: (unique2 IS NOT NULL)
    ->  Result
 (7 rows)
@@ -814,13 +814,13 @@ select max(unique2) from tenk1 order by max(unique2)+1;
 
 explain (costs off)
   select max(unique2), generate_series(1,3) as g from tenk1 order by g desc;
-                             QUERY PLAN                              
----------------------------------------------------------------------
+                              QUERY PLAN                              
+----------------------------------------------------------------------
  Sort
    Sort Key: (generate_series(1, 3)) DESC
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan Backward using tenk1_unique2 on tenk1
+           ->  Index Only Scan Backward using tenk1_unique2 on tenk1a
                  Index Cond: (unique2 IS NOT NULL)
    ->  ProjectSet
          ->  Result
@@ -837,8 +837,8 @@ select max(unique2), generate_series(1,3) as g from tenk1 order by g desc;
 -- interesting corner case: constant gets optimized into a seqscan
 explain (costs off)
   select max(100) from tenk1;
-                     QUERY PLAN                     
-----------------------------------------------------
+            QUERY PLAN            
+----------------------------------
  Result
    InitPlan 1 (returns $0)
      ->  Limit
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index 11f0baa..ba17b80 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -233,23 +233,23 @@ DROP VIEW tmp_view_new;
 alter table stud_emp rename to pg_toast_stud_emp;
 alter table pg_toast_stud_emp rename to stud_emp;
 -- renaming index should rename constraint as well
-ALTER TABLE onek ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1);
+ALTER TABLE oneka ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1);
 ALTER INDEX onek_unique1_constraint RENAME TO onek_unique1_constraint_foo;
-ALTER TABLE onek DROP CONSTRAINT onek_unique1_constraint_foo;
+ALTER TABLE oneka DROP CONSTRAINT onek_unique1_constraint_foo;
 -- renaming constraint
-ALTER TABLE onek ADD CONSTRAINT onek_check_constraint CHECK (unique1 >= 0);
-ALTER TABLE onek RENAME CONSTRAINT onek_check_constraint TO onek_check_constraint_foo;
-ALTER TABLE onek DROP CONSTRAINT onek_check_constraint_foo;
+ALTER TABLE oneka ADD CONSTRAINT onek_check_constraint CHECK (unique1 >= 0);
+ALTER TABLE oneka RENAME CONSTRAINT onek_check_constraint TO onek_check_constraint_foo;
+ALTER TABLE oneka DROP CONSTRAINT onek_check_constraint_foo;
 -- renaming constraint should rename index as well
-ALTER TABLE onek ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1);
+ALTER TABLE oneka ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1);
 DROP INDEX onek_unique1_constraint;  -- to see whether it's there
-ERROR:  cannot drop index onek_unique1_constraint because constraint onek_unique1_constraint on table onek requires it
-HINT:  You can drop constraint onek_unique1_constraint on table onek instead.
-ALTER TABLE onek RENAME CONSTRAINT onek_unique1_constraint TO onek_unique1_constraint_foo;
+ERROR:  cannot drop index onek_unique1_constraint because constraint onek_unique1_constraint on table oneka requires it
+HINT:  You can drop constraint onek_unique1_constraint on table oneka instead.
+ALTER TABLE oneka RENAME CONSTRAINT onek_unique1_constraint TO onek_unique1_constraint_foo;
 DROP INDEX onek_unique1_constraint_foo;  -- to see whether it's there
-ERROR:  cannot drop index onek_unique1_constraint_foo because constraint onek_unique1_constraint_foo on table onek requires it
-HINT:  You can drop constraint onek_unique1_constraint_foo on table onek instead.
-ALTER TABLE onek DROP CONSTRAINT onek_unique1_constraint_foo;
+ERROR:  cannot drop index onek_unique1_constraint_foo because constraint onek_unique1_constraint_foo on table oneka requires it
+HINT:  You can drop constraint onek_unique1_constraint_foo on table oneka instead.
+ALTER TABLE oneka DROP CONSTRAINT onek_unique1_constraint_foo;
 -- renaming constraints vs. inheritance
 CREATE TABLE constraint_rename_test (a int CONSTRAINT con1 CHECK (a > 0), b int, c int);
 \d constraint_rename_test
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out
index 031a0bc..8ed7cc5 100644
--- a/src/test/regress/expected/create_index.out
+++ b/src/test/regress/expected/create_index.out
@@ -5,23 +5,23 @@
 --
 -- BTREE
 --
-CREATE INDEX onek_unique1 ON onek USING btree(unique1 int4_ops);
-CREATE INDEX IF NOT EXISTS onek_unique1 ON onek USING btree(unique1 int4_ops);
+CREATE INDEX onek_unique1 ON oneka USING btree(unique1 int4_ops);
+CREATE INDEX IF NOT EXISTS onek_unique1 ON oneka USING btree(unique1 int4_ops);
 NOTICE:  relation "onek_unique1" already exists, skipping
-CREATE INDEX IF NOT EXISTS ON onek USING btree(unique1 int4_ops);
+CREATE INDEX IF NOT EXISTS ON oneka USING btree(unique1 int4_ops);
 ERROR:  syntax error at or near "ON"
-LINE 1: CREATE INDEX IF NOT EXISTS ON onek USING btree(unique1 int4_...
+LINE 1: CREATE INDEX IF NOT EXISTS ON oneka USING btree(unique1 int4...
                                    ^
-CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops);
-CREATE INDEX onek_hundred ON onek USING btree(hundred int4_ops);
-CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 name_ops);
-CREATE INDEX tenk1_unique1 ON tenk1 USING btree(unique1 int4_ops);
-CREATE INDEX tenk1_unique2 ON tenk1 USING btree(unique2 int4_ops);
-CREATE INDEX tenk1_hundred ON tenk1 USING btree(hundred int4_ops);
-CREATE INDEX tenk1_thous_tenthous ON tenk1 (thousand, tenthous);
-CREATE INDEX tenk2_unique1 ON tenk2 USING btree(unique1 int4_ops);
-CREATE INDEX tenk2_unique2 ON tenk2 USING btree(unique2 int4_ops);
-CREATE INDEX tenk2_hundred ON tenk2 USING btree(hundred int4_ops);
+CREATE INDEX onek_unique2 ON oneka USING btree(unique2 int4_ops);
+CREATE INDEX onek_hundred ON oneka USING btree(hundred int4_ops);
+CREATE INDEX onek_stringu1 ON oneka USING btree(stringu1 name_ops);
+CREATE INDEX tenk1_unique1 ON tenk1a USING btree(unique1 int4_ops);
+CREATE INDEX tenk1_unique2 ON tenk1a USING btree(unique2 int4_ops);
+CREATE INDEX tenk1_hundred ON tenk1a USING btree(hundred int4_ops);
+CREATE INDEX tenk1_thous_tenthous ON tenk1a (thousand, tenthous);
+CREATE INDEX tenk2_unique1 ON tenk2a USING btree(unique1 int4_ops);
+CREATE INDEX tenk2_unique2 ON tenk2a USING btree(unique2 int4_ops);
+CREATE INDEX tenk2_hundred ON tenk2a USING btree(hundred int4_ops);
 CREATE INDEX rix ON road USING btree (name text_ops);
 CREATE INDEX iix ON ihighway USING btree (name text_ops);
 CREATE INDEX six ON shighway USING btree (name text_ops);
@@ -2345,13 +2345,13 @@ DROP TABLE unlogged_hash_table;
 -- Test hash index build tuplesorting.  Force hash tuplesort using low
 -- maintenance_work_mem setting and fillfactor:
 SET maintenance_work_mem = '1MB';
-CREATE INDEX hash_tuplesort_idx ON tenk1 USING hash (stringu1 name_ops) WITH (fillfactor = 10);
+CREATE INDEX hash_tuplesort_idx ON tenk1a USING hash (stringu1 name_ops) WITH (fillfactor = 10);
 EXPLAIN (COSTS OFF)
 SELECT count(*) FROM tenk1 WHERE stringu1 = 'TVAAAA';
                       QUERY PLAN                       
 -------------------------------------------------------
  Aggregate
-   ->  Bitmap Heap Scan on tenk1
+   ->  Bitmap Heap Scan on tenk1a
          Recheck Cond: (stringu1 = 'TVAAAA'::name)
          ->  Bitmap Index Scan on hash_tuplesort_idx
                Index Cond: (stringu1 = 'TVAAAA'::name)
@@ -2800,7 +2800,7 @@ SELECT * FROM tenk1
   WHERE thousand = 42 AND (tenthous = 1 OR tenthous = 3 OR tenthous = 42);
                                                                QUERY PLAN                                                                
 -----------------------------------------------------------------------------------------------------------------------------------------
- Bitmap Heap Scan on tenk1
+ Bitmap Heap Scan on tenk1a
    Recheck Cond: (((thousand = 42) AND (tenthous = 1)) OR ((thousand = 42) AND (tenthous = 3)) OR ((thousand = 42) AND (tenthous = 42)))
    ->  BitmapOr
          ->  Bitmap Index Scan on tenk1_thous_tenthous
@@ -2824,7 +2824,7 @@ SELECT count(*) FROM tenk1
                                    QUERY PLAN                                    
 ---------------------------------------------------------------------------------
  Aggregate
-   ->  Bitmap Heap Scan on tenk1
+   ->  Bitmap Heap Scan on tenk1a
          Recheck Cond: ((hundred = 42) AND ((thousand = 42) OR (thousand = 99)))
          ->  BitmapAnd
                ->  Bitmap Index Scan on tenk1_hundred
@@ -2879,7 +2879,7 @@ WHERE unique1 IN (1,42,7)
 ORDER BY unique1;
                       QUERY PLAN                       
 -------------------------------------------------------
- Index Only Scan using tenk1_unique1 on tenk1
+ Index Only Scan using tenk1_unique1 on tenk1a
    Index Cond: (unique1 = ANY ('{1,42,7}'::integer[]))
 (2 rows)
 
@@ -2899,7 +2899,7 @@ WHERE thousand < 2 AND tenthous IN (1001,3000)
 ORDER BY thousand;
                       QUERY PLAN                       
 -------------------------------------------------------
- Index Only Scan using tenk1_thous_tenthous on tenk1
+ Index Only Scan using tenk1_thous_tenthous on tenk1a
    Index Cond: (thousand < 2)
    Filter: (tenthous = ANY ('{1001,3000}'::integer[]))
 (3 rows)
@@ -2921,8 +2921,8 @@ ORDER BY thousand;
                                       QUERY PLAN                                      
 --------------------------------------------------------------------------------------
  Sort
-   Sort Key: thousand
-   ->  Index Scan using tenk1_thous_tenthous on tenk1
+   Sort Key: tenk1a.thousand
+   ->  Index Scan using tenk1_thous_tenthous on tenk1a
          Index Cond: ((thousand < 2) AND (tenthous = ANY ('{1001,3000}'::integer[])))
 (4 rows)
 
@@ -2943,7 +2943,7 @@ explain (costs off)
   select * from tenk1 where (thousand, tenthous) in ((1,1001), (null,null));
                       QUERY PLAN                      
 ------------------------------------------------------
- Index Scan using tenk1_thous_tenthous on tenk1
+ Index Scan using tenk1_thous_tenthous on tenk1a
    Index Cond: ((thousand = 1) AND (tenthous = 1001))
 (2 rows)
 
diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out
index 335cd37..f32544e 100644
--- a/src/test/regress/expected/create_table.out
+++ b/src/test/regress/expected/create_table.out
@@ -7,11 +7,13 @@
 CREATE TABLE hobbies_r (
 	name		text,
 	person 		text
-);
+) PARTITION BY RANGE (name);
+CREATE TABLE hobbies_ra PARTITION OF hobbies_r FOR VALUES FROM (MINVALUE) TO (MAXVALUE);
 CREATE TABLE equipment_r (
 	name 		text,
 	hobby		text
-);
+) PARTITION BY RANGE (name);
+CREATE TABLE equipment_ra PARTITION OF equipment_r FOR VALUES FROM (MINVALUE) TO (MAXVALUE);
 CREATE TABLE onek (
 	unique1		int4,
 	unique2		int4,
@@ -29,7 +31,8 @@ CREATE TABLE onek (
 	stringu1	name,
 	stringu2	name,
 	string4		name
-);
+) PARTITION BY RANGE (unique1);
+CREATE TABLE oneka PARTITION OF onek FOR VALUES FROM (MINVALUE) TO (MAXVALUE);
 CREATE TABLE tenk1 (
 	unique1		int4,
 	unique2		int4,
@@ -47,7 +50,8 @@ CREATE TABLE tenk1 (
 	stringu1	name,
 	stringu2	name,
 	string4		name
-) WITH OIDS;
+) PARTITION BY RANGE (unique1) WITH OIDS;
+CREATE TABLE tenk1a PARTITION OF tenk1 FOR VALUES FROM (MINVALUE) TO (MAXVALUE);
 CREATE TABLE tenk2 (
 	unique1 	int4,
 	unique2 	int4,
@@ -65,7 +69,8 @@ CREATE TABLE tenk2 (
 	stringu1	name,
 	stringu2	name,
 	string4		name
-);
+) PARTITION BY RANGE (unique1);
+CREATE TABLE tenk2a PARTITION OF tenk2 FOR VALUES FROM (MINVALUE) TO (MAXVALUE);
 CREATE TABLE person (
 	name 		text,
 	age			int4,
diff --git a/src/test/regress/expected/equivclass.out b/src/test/regress/expected/equivclass.out
index c448d85..85fb14f 100644
--- a/src/test/regress/expected/equivclass.out
+++ b/src/test/regress/expected/equivclass.out
@@ -426,7 +426,7 @@ explain (costs off)
   select * from tenk1 where unique1 = unique1 and unique2 = unique2;
                          QUERY PLAN                          
 -------------------------------------------------------------
- Seq Scan on tenk1
+ Seq Scan on tenk1a
    Filter: ((unique1 IS NOT NULL) AND (unique2 IS NOT NULL))
 (2 rows)
 
@@ -435,7 +435,7 @@ explain (costs off)
   select * from tenk1 where unique1 = unique1 or unique2 = unique2;
                        QUERY PLAN                       
 --------------------------------------------------------
- Seq Scan on tenk1
+ Seq Scan on tenk1a
    Filter: ((unique1 = unique1) OR (unique2 = unique2))
 (2 rows)
 
diff --git a/src/test/regress/expected/groupingsets.out b/src/test/regress/expected/groupingsets.out
index 833d515..d9b59e3 100644
--- a/src/test/regress/expected/groupingsets.out
+++ b/src/test/regress/expected/groupingsets.out
@@ -415,12 +415,12 @@ LINE 3:        lateral (select a, b, sum(v.x) from gstest_data(v.x) ...
 -- min max optimization should still work with GROUP BY ()
 explain (costs off)
   select min(unique1) from tenk1 GROUP BY ();
-                         QUERY PLAN                         
-------------------------------------------------------------
+                         QUERY PLAN                          
+-------------------------------------------------------------
  Result
    InitPlan 1 (returns $0)
      ->  Limit
-           ->  Index Only Scan using tenk1_unique1 on tenk1
+           ->  Index Only Scan using tenk1_unique1 on tenk1a
                  Index Cond: (unique1 IS NOT NULL)
 (5 rows)
 
@@ -1420,21 +1420,21 @@ explain (costs off)
          count(hundred), count(thousand), count(twothousand),
          count(*)
     from tenk1 group by grouping sets (unique1,twothousand,thousand,hundred,ten,four,two);
-          QUERY PLAN           
--------------------------------
+            QUERY PLAN             
+-----------------------------------
  MixedAggregate
-   Hash Key: two
-   Hash Key: four
-   Hash Key: ten
-   Hash Key: hundred
-   Group Key: unique1
-   Sort Key: twothousand
-     Group Key: twothousand
-   Sort Key: thousand
-     Group Key: thousand
+   Hash Key: tenk1a.two
+   Hash Key: tenk1a.four
+   Hash Key: tenk1a.ten
+   Hash Key: tenk1a.hundred
+   Group Key: tenk1a.unique1
+   Sort Key: tenk1a.twothousand
+     Group Key: tenk1a.twothousand
+   Sort Key: tenk1a.thousand
+     Group Key: tenk1a.thousand
    ->  Sort
-         Sort Key: unique1
-         ->  Seq Scan on tenk1
+         Sort Key: tenk1a.unique1
+         ->  Seq Scan on tenk1a
 (13 rows)
 
 explain (costs off)
@@ -1443,17 +1443,17 @@ explain (costs off)
          count(hundred), count(thousand), count(twothousand),
          count(*)
     from tenk1 group by grouping sets (unique1,hundred,ten,four,two);
-          QUERY PLAN           
--------------------------------
+            QUERY PLAN            
+----------------------------------
  MixedAggregate
-   Hash Key: two
-   Hash Key: four
-   Hash Key: ten
-   Hash Key: hundred
-   Group Key: unique1
+   Hash Key: tenk1a.two
+   Hash Key: tenk1a.four
+   Hash Key: tenk1a.ten
+   Hash Key: tenk1a.hundred
+   Group Key: tenk1a.unique1
    ->  Sort
-         Sort Key: unique1
-         ->  Seq Scan on tenk1
+         Sort Key: tenk1a.unique1
+         ->  Seq Scan on tenk1a
 (9 rows)
 
 set work_mem = '384kB';
@@ -1463,20 +1463,20 @@ explain (costs off)
          count(hundred), count(thousand), count(twothousand),
          count(*)
     from tenk1 group by grouping sets (unique1,twothousand,thousand,hundred,ten,four,two);
-          QUERY PLAN           
--------------------------------
+            QUERY PLAN             
+-----------------------------------
  MixedAggregate
-   Hash Key: two
-   Hash Key: four
-   Hash Key: ten
-   Hash Key: hundred
-   Hash Key: thousand
-   Group Key: unique1
-   Sort Key: twothousand
-     Group Key: twothousand
+   Hash Key: tenk1a.two
+   Hash Key: tenk1a.four
+   Hash Key: tenk1a.ten
+   Hash Key: tenk1a.hundred
+   Hash Key: tenk1a.thousand
+   Group Key: tenk1a.unique1
+   Sort Key: tenk1a.twothousand
+     Group Key: tenk1a.twothousand
    ->  Sort
-         Sort Key: unique1
-         ->  Seq Scan on tenk1
+         Sort Key: tenk1a.unique1
+         ->  Seq Scan on tenk1a
 (12 rows)
 
 -- end
diff --git a/src/test/regress/expected/inherit.out b/src/test/regress/expected/inherit.out
index 6d27dd0..1a688c5 100644
--- a/src/test/regress/expected/inherit.out
+++ b/src/test/regress/expected/inherit.out
@@ -1521,14 +1521,14 @@ SELECT thousand, tenthous FROM tenk1
 UNION ALL
 SELECT thousand, thousand FROM tenk1
 ORDER BY thousand, tenthous;
-                               QUERY PLAN                                
--------------------------------------------------------------------------
+                                QUERY PLAN                                 
+---------------------------------------------------------------------------
  Merge Append
-   Sort Key: tenk1.thousand, tenk1.tenthous
-   ->  Index Only Scan using tenk1_thous_tenthous on tenk1
+   Sort Key: tenk1a.thousand, tenk1a.tenthous
+   ->  Index Only Scan using tenk1_thous_tenthous on tenk1a
    ->  Sort
-         Sort Key: tenk1_1.thousand, tenk1_1.thousand
-         ->  Index Only Scan using tenk1_thous_tenthous on tenk1 tenk1_1
+         Sort Key: tenk1a_1.thousand, tenk1a_1.thousand
+         ->  Index Only Scan using tenk1_thous_tenthous on tenk1a tenk1a_1
 (6 rows)
 
 explain (costs off)
@@ -1536,14 +1536,14 @@ SELECT thousand, tenthous, thousand+tenthous AS x FROM tenk1
 UNION ALL
 SELECT 42, 42, hundred FROM tenk1
 ORDER BY thousand, tenthous;
-                            QUERY PLAN                            
-------------------------------------------------------------------
+                             QUERY PLAN                             
+--------------------------------------------------------------------
  Merge Append
-   Sort Key: tenk1.thousand, tenk1.tenthous
-   ->  Index Only Scan using tenk1_thous_tenthous on tenk1
+   Sort Key: tenk1a.thousand, tenk1a.tenthous
+   ->  Index Only Scan using tenk1_thous_tenthous on tenk1a
    ->  Sort
          Sort Key: 42, 42
-         ->  Index Only Scan using tenk1_hundred on tenk1 tenk1_1
+         ->  Index Only Scan using tenk1_hundred on tenk1a tenk1a_1
 (6 rows)
 
 explain (costs off)
@@ -1551,14 +1551,14 @@ SELECT thousand, tenthous FROM tenk1
 UNION ALL
 SELECT thousand, random()::integer FROM tenk1
 ORDER BY thousand, tenthous;
-                               QUERY PLAN                                
--------------------------------------------------------------------------
+                                QUERY PLAN                                 
+---------------------------------------------------------------------------
  Merge Append
-   Sort Key: tenk1.thousand, tenk1.tenthous
-   ->  Index Only Scan using tenk1_thous_tenthous on tenk1
+   Sort Key: tenk1a.thousand, tenk1a.tenthous
+   ->  Index Only Scan using tenk1_thous_tenthous on tenk1a
    ->  Sort
-         Sort Key: tenk1_1.thousand, ((random())::integer)
-         ->  Index Only Scan using tenk1_thous_tenthous on tenk1 tenk1_1
+         Sort Key: tenk1a_1.thousand, ((random())::integer)
+         ->  Index Only Scan using tenk1_thous_tenthous on tenk1a tenk1a_1
 (6 rows)
 
 -- Check min/max aggregate optimization
@@ -1567,16 +1567,16 @@ SELECT min(x) FROM
   (SELECT unique1 AS x FROM tenk1 a
    UNION ALL
    SELECT unique2 AS x FROM tenk1 b) s;
-                             QUERY PLAN                             
---------------------------------------------------------------------
+                             QUERY PLAN                              
+---------------------------------------------------------------------
  Result
    InitPlan 1 (returns $0)
      ->  Limit
            ->  Merge Append
                  Sort Key: a.unique1
-                 ->  Index Only Scan using tenk1_unique1 on tenk1 a
+                 ->  Index Only Scan using tenk1_unique1 on tenk1a a
                        Index Cond: (unique1 IS NOT NULL)
-                 ->  Index Only Scan using tenk1_unique2 on tenk1 b
+                 ->  Index Only Scan using tenk1_unique2 on tenk1a b
                        Index Cond: (unique2 IS NOT NULL)
 (9 rows)
 
@@ -1585,16 +1585,16 @@ SELECT min(y) FROM
   (SELECT unique1 AS x, unique1 AS y FROM tenk1 a
    UNION ALL
    SELECT unique2 AS x, unique2 AS y FROM tenk1 b) s;
-                             QUERY PLAN                             
---------------------------------------------------------------------
+                             QUERY PLAN                              
+---------------------------------------------------------------------
  Result
    InitPlan 1 (returns $0)
      ->  Limit
            ->  Merge Append
                  Sort Key: a.unique1
-                 ->  Index Only Scan using tenk1_unique1 on tenk1 a
+                 ->  Index Only Scan using tenk1_unique1 on tenk1a a
                        Index Cond: (unique1 IS NOT NULL)
-                 ->  Index Only Scan using tenk1_unique2 on tenk1 b
+                 ->  Index Only Scan using tenk1_unique2 on tenk1a b
                        Index Cond: (unique2 IS NOT NULL)
 (9 rows)
 
@@ -1605,14 +1605,14 @@ SELECT x, y FROM
    UNION ALL
    SELECT unique2 AS x, unique2 AS y FROM tenk1 b) s
 ORDER BY x, y;
-                         QUERY PLAN                          
--------------------------------------------------------------
+                          QUERY PLAN                          
+--------------------------------------------------------------
  Merge Append
    Sort Key: a.thousand, a.tenthous
-   ->  Index Only Scan using tenk1_thous_tenthous on tenk1 a
+   ->  Index Only Scan using tenk1_thous_tenthous on tenk1a a
    ->  Sort
          Sort Key: b.unique2, b.unique2
-         ->  Index Only Scan using tenk1_unique2 on tenk1 b
+         ->  Index Only Scan using tenk1_unique2 on tenk1a b
 (6 rows)
 
 -- exercise rescan code path via a repeatedly-evaluated subquery
diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out
index f47449b..7e95525 100644
--- a/src/test/regress/expected/join.out
+++ b/src/test/regress/expected/join.out
@@ -2255,7 +2255,7 @@ where b.f1 = t.thousand and a.f1 = b.f1 and (a.f1+b.f1+999) = t.tenthous;
          Join Filter: ((sum(i4b.f1)) = ((sum(i4a.f1) + 1)))
          ->  Aggregate
                ->  Seq Scan on int4_tbl i4a
-         ->  Index Only Scan using tenk1_thous_tenthous on tenk1 t
+         ->  Index Only Scan using tenk1_thous_tenthous on tenk1a t
                Index Cond: ((thousand = (sum(i4b.f1))) AND (tenthous = ((((sum(i4a.f1) + 1)) + (sum(i4b.f1))) + 999)))
 (9 rows)
 
@@ -2370,14 +2370,14 @@ set enable_mergejoin to off;
 explain (costs off)
 select count(*) from tenk1 a, tenk1 b
   where a.hundred = b.thousand and (b.fivethous % 10) < 10;
-                         QUERY PLAN                         
-------------------------------------------------------------
+                         QUERY PLAN                          
+-------------------------------------------------------------
  Aggregate
    ->  Hash Join
          Hash Cond: (a.hundred = b.thousand)
-         ->  Index Only Scan using tenk1_hundred on tenk1 a
+         ->  Index Only Scan using tenk1_hundred on tenk1a a
          ->  Hash
-               ->  Seq Scan on tenk1 b
+               ->  Seq Scan on tenk1a b
                      Filter: ((fivethous % 10) < 10)
 (7 rows)
 
@@ -2726,7 +2726,7 @@ SELECT qq, unique1
          ->  Seq Scan on int8_tbl a
          ->  Hash
                ->  Seq Scan on int8_tbl b
-   ->  Index Scan using tenk1_unique2 on tenk1 c
+   ->  Index Scan using tenk1_unique2 on tenk1a c
          Index Cond: (unique2 = COALESCE((COALESCE(a.q1, '0'::bigint)), (COALESCE(b.q2, '-1'::bigint))))
 (8 rows)
 
@@ -2922,12 +2922,12 @@ where q1 = thousand or q2 = thousand;
                                QUERY PLAN                               
 ------------------------------------------------------------------------
  Hash Join
-   Hash Cond: (tenk1.twothousand = int4_tbl.f1)
+   Hash Cond: (tenk1a.twothousand = int4_tbl.f1)
    ->  Nested Loop
          ->  Nested Loop
                ->  Function Scan on q1
                ->  Function Scan on q2
-         ->  Bitmap Heap Scan on tenk1
+         ->  Bitmap Heap Scan on tenk1a
                Recheck Cond: ((q1.q1 = thousand) OR (q2.q2 = thousand))
                ->  BitmapOr
                      ->  Bitmap Index Scan on tenk1_thous_tenthous
@@ -2947,12 +2947,12 @@ where thousand = (q1 + q2);
                           QUERY PLAN                          
 --------------------------------------------------------------
  Hash Join
-   Hash Cond: (tenk1.twothousand = int4_tbl.f1)
+   Hash Cond: (tenk1a.twothousand = int4_tbl.f1)
    ->  Nested Loop
          ->  Nested Loop
                ->  Function Scan on q1
                ->  Function Scan on q2
-         ->  Bitmap Heap Scan on tenk1
+         ->  Bitmap Heap Scan on tenk1a
                Recheck Cond: (thousand = (q1.q1 + q2.q2))
                ->  Bitmap Index Scan on tenk1_thous_tenthous
                      Index Cond: (thousand = (q1.q1 + q2.q2))
@@ -2975,7 +2975,7 @@ where thousand = a.q1 and tenthous = b.q1 and a.q2 = 1 and b.q2 = 2;
    ->  Nested Loop
          ->  Seq Scan on int8_tbl a
                Filter: (q2 = 1)
-         ->  Index Scan using tenk1_thous_tenthous on tenk1
+         ->  Index Scan using tenk1_thous_tenthous on tenk1a
                Index Cond: ((thousand = a.q1) AND (tenthous = b.q1))
 (8 rows)
 
@@ -3006,10 +3006,10 @@ where t1.unique2 < 42 and t1.stringu1 > t2.stringu2;
                      Join Filter: ((1) = (1))
                      ->  Result
                      ->  Result
-               ->  Index Scan using tenk1_unique2 on tenk1 t1
+               ->  Index Scan using tenk1_unique2 on tenk1a t1
                      Index Cond: ((unique2 = (11)) AND (unique2 < 42))
          ->  Seq Scan on int4_tbl i1
-   ->  Index Scan using tenk1_unique1 on tenk1 t2
+   ->  Index Scan using tenk1_unique1 on tenk1a t2
          Index Cond: (unique1 = (3))
 (14 rows)
 
@@ -3061,7 +3061,7 @@ select * from tenk1 a join tenk1 b on
 -------------------------------------------------------------------------------------------------
  Nested Loop
    Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR ((a.unique2 = 3) AND (b.hundred = 4)))
-   ->  Bitmap Heap Scan on tenk1 b
+   ->  Bitmap Heap Scan on tenk1a b
          Recheck Cond: ((unique1 = 2) OR (hundred = 4))
          ->  BitmapOr
                ->  Bitmap Index Scan on tenk1_unique1
@@ -3069,7 +3069,7 @@ select * from tenk1 a join tenk1 b on
                ->  Bitmap Index Scan on tenk1_hundred
                      Index Cond: (hundred = 4)
    ->  Materialize
-         ->  Bitmap Heap Scan on tenk1 a
+         ->  Bitmap Heap Scan on tenk1a a
                Recheck Cond: ((unique1 = 1) OR (unique2 = 3))
                ->  BitmapOr
                      ->  Bitmap Index Scan on tenk1_unique1
@@ -3085,10 +3085,10 @@ select * from tenk1 a join tenk1 b on
 ---------------------------------------------------------------------------------------------
  Nested Loop
    Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR ((a.unique2 = 3) AND (b.ten = 4)))
-   ->  Seq Scan on tenk1 b
+   ->  Seq Scan on tenk1a b
          Filter: ((unique1 = 2) OR (ten = 4))
    ->  Materialize
-         ->  Bitmap Heap Scan on tenk1 a
+         ->  Bitmap Heap Scan on tenk1a a
                Recheck Cond: ((unique1 = 1) OR (unique2 = 3))
                ->  BitmapOr
                      ->  Bitmap Index Scan on tenk1_unique1
@@ -3105,7 +3105,7 @@ select * from tenk1 a join tenk1 b on
 ----------------------------------------------------------------------------------------------------------------------
  Nested Loop
    Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR (((a.unique2 = 3) OR (a.unique2 = 7)) AND (b.hundred = 4)))
-   ->  Bitmap Heap Scan on tenk1 b
+   ->  Bitmap Heap Scan on tenk1a b
          Recheck Cond: ((unique1 = 2) OR (hundred = 4))
          ->  BitmapOr
                ->  Bitmap Index Scan on tenk1_unique1
@@ -3113,7 +3113,7 @@ select * from tenk1 a join tenk1 b on
                ->  Bitmap Index Scan on tenk1_hundred
                      Index Cond: (hundred = 4)
    ->  Materialize
-         ->  Bitmap Heap Scan on tenk1 a
+         ->  Bitmap Heap Scan on tenk1a a
                Recheck Cond: ((unique1 = 1) OR (unique2 = 3) OR (unique2 = 7))
                ->  BitmapOr
                      ->  Bitmap Index Scan on tenk1_unique1
@@ -3132,18 +3132,18 @@ select * from tenk1 t1 left join
   (tenk1 t2 join tenk1 t3 on t2.thousand = t3.unique2)
   on t1.hundred = t2.hundred and t1.ten = t3.ten
 where t1.unique1 = 1;
-                       QUERY PLAN                       
---------------------------------------------------------
+                       QUERY PLAN                        
+---------------------------------------------------------
  Nested Loop Left Join
-   ->  Index Scan using tenk1_unique1 on tenk1 t1
+   ->  Index Scan using tenk1_unique1 on tenk1a t1
          Index Cond: (unique1 = 1)
    ->  Nested Loop
          Join Filter: (t1.ten = t3.ten)
-         ->  Bitmap Heap Scan on tenk1 t2
+         ->  Bitmap Heap Scan on tenk1a t2
                Recheck Cond: (t1.hundred = hundred)
                ->  Bitmap Index Scan on tenk1_hundred
                      Index Cond: (t1.hundred = hundred)
-         ->  Index Scan using tenk1_unique2 on tenk1 t3
+         ->  Index Scan using tenk1_unique2 on tenk1a t3
                Index Cond: (unique2 = t2.thousand)
 (11 rows)
 
@@ -3152,18 +3152,18 @@ select * from tenk1 t1 left join
   (tenk1 t2 join tenk1 t3 on t2.thousand = t3.unique2)
   on t1.hundred = t2.hundred and t1.ten + t2.ten = t3.ten
 where t1.unique1 = 1;
-                       QUERY PLAN                       
---------------------------------------------------------
+                       QUERY PLAN                        
+---------------------------------------------------------
  Nested Loop Left Join
-   ->  Index Scan using tenk1_unique1 on tenk1 t1
+   ->  Index Scan using tenk1_unique1 on tenk1a t1
          Index Cond: (unique1 = 1)
    ->  Nested Loop
          Join Filter: ((t1.ten + t2.ten) = t3.ten)
-         ->  Bitmap Heap Scan on tenk1 t2
+         ->  Bitmap Heap Scan on tenk1a t2
                Recheck Cond: (t1.hundred = hundred)
                ->  Bitmap Index Scan on tenk1_hundred
                      Index Cond: (t1.hundred = hundred)
-         ->  Index Scan using tenk1_unique2 on tenk1 t3
+         ->  Index Scan using tenk1_unique2 on tenk1a t3
                Index Cond: (unique2 = t2.thousand)
 (11 rows)
 
@@ -3180,13 +3180,13 @@ select count(*) from
          ->  Nested Loop
                ->  Nested Loop
                      ->  Seq Scan on int4_tbl
-                     ->  Bitmap Heap Scan on tenk1 b
+                     ->  Bitmap Heap Scan on tenk1a b
                            Recheck Cond: (thousand = int4_tbl.f1)
                            ->  Bitmap Index Scan on tenk1_thous_tenthous
                                  Index Cond: (thousand = int4_tbl.f1)
-               ->  Index Scan using tenk1_unique1 on tenk1 a
+               ->  Index Scan using tenk1_unique1 on tenk1a a
                      Index Cond: (unique1 = b.unique2)
-         ->  Index Only Scan using tenk1_thous_tenthous on tenk1 c
+         ->  Index Only Scan using tenk1_thous_tenthous on tenk1a c
                Index Cond: (thousand = a.thousand)
 (14 rows)
 
@@ -3217,11 +3217,11 @@ select b.unique1 from
                ->  Nested Loop
                      ->  Nested Loop
                            ->  Seq Scan on int4_tbl i1
-                           ->  Index Scan using tenk1_thous_tenthous on tenk1 b
+                           ->  Index Scan using tenk1_thous_tenthous on tenk1a b
                                  Index Cond: ((thousand = i1.f1) AND (i2.f1 = tenthous))
-                     ->  Index Scan using tenk1_unique1 on tenk1 a
+                     ->  Index Scan using tenk1_unique1 on tenk1a a
                            Index Cond: (unique1 = b.unique2)
-               ->  Index Only Scan using tenk1_thous_tenthous on tenk1 c
+               ->  Index Only Scan using tenk1_thous_tenthous on tenk1a c
                      Index Cond: (thousand = a.thousand)
 (15 rows)
 
@@ -3248,12 +3248,12 @@ select * from
 ) ss
 where fault = 122
 order by fault;
-                                QUERY PLAN                                
---------------------------------------------------------------------------
+                                QUERY PLAN                                 
+---------------------------------------------------------------------------
  Nested Loop Left Join
-   Filter: ((COALESCE(tenk1.unique1, '-1'::integer) + int8_tbl.q1) = 122)
+   Filter: ((COALESCE(tenk1a.unique1, '-1'::integer) + int8_tbl.q1) = 122)
    ->  Seq Scan on int8_tbl
-   ->  Index Scan using tenk1_unique2 on tenk1
+   ->  Index Scan using tenk1_unique2 on tenk1a
          Index Cond: (int8_tbl.q2 = unique2)
 (5 rows)
 
@@ -3281,7 +3281,7 @@ select q1, unique2, thousand, hundred
  Nested Loop Left Join
    Filter: ((COALESCE(b.thousand, 123) = a.q1) AND (a.q1 = COALESCE(b.hundred, 123)))
    ->  Seq Scan on int8_tbl a
-   ->  Index Scan using tenk1_unique2 on tenk1 b
+   ->  Index Scan using tenk1_unique2 on tenk1a b
          Index Cond: (a.q1 = unique2)
 (5 rows)
 
@@ -3301,7 +3301,7 @@ select f1, unique2, case when unique2 is null then f1 else 0 end
  Nested Loop Left Join
    Filter: (CASE WHEN (b.unique2 IS NULL) THEN a.f1 ELSE 0 END = 0)
    ->  Seq Scan on int4_tbl a
-   ->  Index Only Scan using tenk1_unique2 on tenk1 b
+   ->  Index Only Scan using tenk1_unique2 on tenk1a b
          Index Cond: (unique2 = a.f1)
 (5 rows)
 
@@ -3325,13 +3325,13 @@ select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand)
  Nested Loop Left Join
    ->  Nested Loop Left Join
          Filter: (COALESCE(b.twothousand, a.twothousand) = 44)
-         ->  Index Scan using tenk1_unique2 on tenk1 a
+         ->  Index Scan using tenk1_unique2 on tenk1a a
                Index Cond: (unique2 < 10)
-         ->  Bitmap Heap Scan on tenk1 b
+         ->  Bitmap Heap Scan on tenk1a b
                Recheck Cond: (thousand = a.unique1)
                ->  Bitmap Index Scan on tenk1_thous_tenthous
                      Index Cond: (thousand = a.unique1)
-   ->  Index Scan using tenk1_unique2 on tenk1 c
+   ->  Index Scan using tenk1_unique2 on tenk1a c
          Index Cond: ((unique2 = COALESCE(b.twothousand, a.twothousand)) AND (unique2 = 44))
 (11 rows)
 
@@ -3358,8 +3358,8 @@ left join
    using (join_key)
   ) foo3
 using (join_key);
-                                QUERY PLAN                                
---------------------------------------------------------------------------
+                                QUERY PLAN                                 
+---------------------------------------------------------------------------
  Nested Loop Left Join
    Output: "*VALUES*".column1, i1.f1, (666)
    Join Filter: ("*VALUES*".column1 = i1.f1)
@@ -3371,7 +3371,7 @@ using (join_key);
                Output: i1.f1, 666
                ->  Seq Scan on public.int4_tbl i1
                      Output: i1.f1
-               ->  Index Only Scan using tenk1_unique2 on public.tenk1 i2
+               ->  Index Only Scan using tenk1_unique2 on public.tenk1a i2
                      Output: i2.unique2
                      Index Cond: (i2.unique2 = i1.f1)
 (14 rows)
@@ -3849,7 +3849,7 @@ select * from
    ->  Result
    ->  Hash Full Join
          Hash Cond: (a1.unique1 = (1))
-         ->  Seq Scan on tenk1 a1
+         ->  Seq Scan on tenk1a a1
          ->  Hash
                ->  Result
 (8 rows)
@@ -3869,25 +3869,25 @@ select * from
 --
 explain (costs off)
   select * from int4_tbl a left join tenk1 b on f1 = unique2 where f1 = 0;
-                   QUERY PLAN                    
--------------------------------------------------
+                    QUERY PLAN                    
+--------------------------------------------------
  Nested Loop Left Join
    Join Filter: (a.f1 = b.unique2)
    ->  Seq Scan on int4_tbl a
          Filter: (f1 = 0)
-   ->  Index Scan using tenk1_unique2 on tenk1 b
+   ->  Index Scan using tenk1_unique2 on tenk1a b
          Index Cond: (unique2 = 0)
 (6 rows)
 
 explain (costs off)
   select * from tenk1 a full join tenk1 b using(unique2) where unique2 = 42;
-                   QUERY PLAN                    
--------------------------------------------------
+                    QUERY PLAN                    
+--------------------------------------------------
  Merge Full Join
    Merge Cond: (a.unique2 = b.unique2)
-   ->  Index Scan using tenk1_unique2 on tenk1 a
+   ->  Index Scan using tenk1_unique2 on tenk1a a
          Index Cond: (unique2 = 42)
-   ->  Index Scan using tenk1_unique2 on tenk1 b
+   ->  Index Scan using tenk1_unique2 on tenk1a b
          Index Cond: (unique2 = 42)
 (6 rows)
 
@@ -4226,7 +4226,7 @@ where ss.stringu2 !~* ss.case1;
    Join Filter: (CASE t1.ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END = t0.f1)
    ->  Nested Loop
          ->  Seq Scan on int4_tbl i4
-         ->  Index Scan using tenk1_unique2 on tenk1 t1
+         ->  Index Scan using tenk1_unique2 on tenk1a t1
                Index Cond: (unique2 = i4.f1)
                Filter: (stringu2 !~* CASE ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END)
    ->  Materialize
@@ -4313,11 +4313,11 @@ from tenk1 a, lateral (select * from int4_tbl b where f1 = a.unique1) x;
 explain (costs off)
   select unique2, x.*
   from tenk1 a, lateral (select * from int4_tbl b where f1 = a.unique1) x;
-                   QUERY PLAN                    
--------------------------------------------------
+                    QUERY PLAN                    
+--------------------------------------------------
  Nested Loop
    ->  Seq Scan on int4_tbl b
-   ->  Index Scan using tenk1_unique1 on tenk1 a
+   ->  Index Scan using tenk1_unique1 on tenk1a a
          Index Cond: (unique1 = b.f1)
 (4 rows)
 
@@ -4331,22 +4331,22 @@ from int4_tbl x, lateral (select unique2 from tenk1 where f1 = unique1) ss;
 explain (costs off)
   select unique2, x.*
   from int4_tbl x, lateral (select unique2 from tenk1 where f1 = unique1) ss;
-                  QUERY PLAN                   
------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Nested Loop
    ->  Seq Scan on int4_tbl x
-   ->  Index Scan using tenk1_unique1 on tenk1
+   ->  Index Scan using tenk1_unique1 on tenk1a
          Index Cond: (unique1 = x.f1)
 (4 rows)
 
 explain (costs off)
   select unique2, x.*
   from int4_tbl x cross join lateral (select unique2 from tenk1 where f1 = unique1) ss;
-                  QUERY PLAN                   
------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Nested Loop
    ->  Seq Scan on int4_tbl x
-   ->  Index Scan using tenk1_unique1 on tenk1
+   ->  Index Scan using tenk1_unique1 on tenk1a
          Index Cond: (unique1 = x.f1)
 (4 rows)
 
@@ -4364,11 +4364,11 @@ from int4_tbl x left join lateral (select unique1, unique2 from tenk1 where f1 =
 explain (costs off)
   select unique2, x.*
   from int4_tbl x left join lateral (select unique1, unique2 from tenk1 where f1 = unique1) ss on true;
-                  QUERY PLAN                   
------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Nested Loop Left Join
    ->  Seq Scan on int4_tbl x
-   ->  Index Scan using tenk1_unique1 on tenk1
+   ->  Index Scan using tenk1_unique1 on tenk1a
          Index Cond: (x.f1 = unique1)
 (4 rows)
 
@@ -4462,13 +4462,13 @@ select * from generate_series(100,200) g,
 explain (costs off)
   select count(*) from tenk1 a,
     tenk1 b join lateral (values(a.unique1)) ss(x) on b.unique2 = ss.x;
-                         QUERY PLAN                         
-------------------------------------------------------------
+                         QUERY PLAN                          
+-------------------------------------------------------------
  Aggregate
    ->  Merge Join
          Merge Cond: (a.unique1 = b.unique2)
-         ->  Index Only Scan using tenk1_unique1 on tenk1 a
-         ->  Index Only Scan using tenk1_unique2 on tenk1 b
+         ->  Index Only Scan using tenk1_unique1 on tenk1a a
+         ->  Index Only Scan using tenk1_unique2 on tenk1a b
 (5 rows)
 
 select count(*) from tenk1 a,
@@ -4482,16 +4482,16 @@ select count(*) from tenk1 a,
 explain (costs off)
   select count(*) from tenk1 a,
     tenk1 b join lateral (values(a.unique1),(-1)) ss(x) on b.unique2 = ss.x;
-                            QUERY PLAN                            
-------------------------------------------------------------------
+                            QUERY PLAN                             
+-------------------------------------------------------------------
  Aggregate
    ->  Hash Join
          Hash Cond: ("*VALUES*".column1 = b.unique2)
          ->  Nested Loop
-               ->  Index Only Scan using tenk1_unique1 on tenk1 a
+               ->  Index Only Scan using tenk1_unique1 on tenk1a a
                ->  Values Scan on "*VALUES*"
          ->  Hash
-               ->  Index Only Scan using tenk1_unique2 on tenk1 b
+               ->  Index Only Scan using tenk1_unique2 on tenk1a b
 (8 rows)
 
 select count(*) from tenk1 a,
@@ -5173,22 +5173,22 @@ select * from
   lateral (select f1 from int4_tbl
            where f1 = any (select unique1 from tenk1
                            where unique2 = v.x offset 0)) ss;
-                              QUERY PLAN                              
-----------------------------------------------------------------------
+                              QUERY PLAN                               
+-----------------------------------------------------------------------
  Nested Loop
    Output: "*VALUES*".column1, "*VALUES*".column2, int4_tbl.f1
    ->  Values Scan on "*VALUES*"
          Output: "*VALUES*".column1, "*VALUES*".column2
    ->  Nested Loop Semi Join
          Output: int4_tbl.f1
-         Join Filter: (int4_tbl.f1 = tenk1.unique1)
+         Join Filter: (int4_tbl.f1 = tenk1a.unique1)
          ->  Seq Scan on public.int4_tbl
                Output: int4_tbl.f1
          ->  Materialize
-               Output: tenk1.unique1
-               ->  Index Scan using tenk1_unique2 on public.tenk1
-                     Output: tenk1.unique1
-                     Index Cond: (tenk1.unique2 = "*VALUES*".column2)
+               Output: tenk1a.unique1
+               ->  Index Scan using tenk1_unique2 on public.tenk1a
+                     Output: tenk1a.unique1
+                     Index Cond: (tenk1a.unique2 = "*VALUES*".column2)
 (14 rows)
 
 select * from
@@ -5735,8 +5735,8 @@ from onek t1, tenk1 t2
 where exists (select 1 from tenk1 t3
               where t3.thousand = t1.unique1 and t3.tenthous = t2.hundred)
       and t1.unique1 < 1;
-                                   QUERY PLAN                                    
----------------------------------------------------------------------------------
+                                    QUERY PLAN                                    
+----------------------------------------------------------------------------------
  Nested Loop
    Output: t1.unique1, t2.hundred
    ->  Hash Join
@@ -5745,14 +5745,14 @@ where exists (select 1 from tenk1 t3
          ->  HashAggregate
                Output: t3.thousand, t3.tenthous
                Group Key: t3.thousand, t3.tenthous
-               ->  Index Only Scan using tenk1_thous_tenthous on public.tenk1 t3
+               ->  Index Only Scan using tenk1_thous_tenthous on public.tenk1a t3
                      Output: t3.thousand, t3.tenthous
          ->  Hash
                Output: t1.unique1
-               ->  Index Only Scan using onek_unique1 on public.onek t1
+               ->  Index Only Scan using onek_unique1 on public.oneka t1
                      Output: t1.unique1
                      Index Cond: (t1.unique1 < 1)
-   ->  Index Only Scan using tenk1_hundred on public.tenk1 t2
+   ->  Index Only Scan using tenk1_hundred on public.tenk1a t2
          Output: t2.hundred
          Index Cond: (t2.hundred = t3.tenthous)
 (18 rows)
@@ -5773,13 +5773,13 @@ where exists (select 1 from j3
    Output: t1.unique1, t2.hundred
    ->  Nested Loop
          Output: t1.unique1, j3.tenthous
-         ->  Index Only Scan using onek_unique1 on public.onek t1
+         ->  Index Only Scan using onek_unique1 on public.oneka t1
                Output: t1.unique1
                Index Cond: (t1.unique1 < 1)
          ->  Index Only Scan using j3_unique1_tenthous_idx on public.j3
                Output: j3.unique1, j3.tenthous
                Index Cond: (j3.unique1 = t1.unique1)
-   ->  Index Only Scan using tenk1_hundred on public.tenk1 t2
+   ->  Index Only Scan using tenk1_hundred on public.tenk1a t2
          Output: t2.hundred
          Index Cond: (t2.hundred = j3.tenthous)
 (13 rows)
diff --git a/src/test/regress/expected/limit.out b/src/test/regress/expected/limit.out
index c18f547..c5adb9c 100644
--- a/src/test/regress/expected/limit.out
+++ b/src/test/regress/expected/limit.out
@@ -316,12 +316,12 @@ create temp sequence testseq;
 explain (verbose, costs off)
 select unique1, unique2, nextval('testseq')
   from tenk1 order by unique2 limit 10;
-                           QUERY PLAN                           
-----------------------------------------------------------------
+                                  QUERY PLAN                                  
+------------------------------------------------------------------------------
  Limit
-   Output: unique1, unique2, (nextval('testseq'::regclass))
-   ->  Index Scan using tenk1_unique2 on public.tenk1
-         Output: unique1, unique2, nextval('testseq'::regclass)
+   Output: tenk1a.unique1, tenk1a.unique2, (nextval('testseq'::regclass))
+   ->  Index Scan using tenk1_unique2 on public.tenk1a
+         Output: tenk1a.unique1, tenk1a.unique2, nextval('testseq'::regclass)
 (4 rows)
 
 select unique1, unique2, nextval('testseq')
@@ -349,17 +349,17 @@ select currval('testseq');
 explain (verbose, costs off)
 select unique1, unique2, nextval('testseq')
   from tenk1 order by tenthous limit 10;
-                                QUERY PLAN                                
---------------------------------------------------------------------------
+                                          QUERY PLAN                                           
+-----------------------------------------------------------------------------------------------
  Limit
-   Output: unique1, unique2, (nextval('testseq'::regclass)), tenthous
+   Output: tenk1a.unique1, tenk1a.unique2, (nextval('testseq'::regclass)), tenk1a.tenthous
    ->  Result
-         Output: unique1, unique2, nextval('testseq'::regclass), tenthous
+         Output: tenk1a.unique1, tenk1a.unique2, nextval('testseq'::regclass), tenk1a.tenthous
          ->  Sort
-               Output: unique1, unique2, tenthous
-               Sort Key: tenk1.tenthous
-               ->  Seq Scan on public.tenk1
-                     Output: unique1, unique2, tenthous
+               Output: tenk1a.unique1, tenk1a.unique2, tenk1a.tenthous
+               Sort Key: tenk1a.tenthous
+               ->  Seq Scan on public.tenk1a
+                     Output: tenk1a.unique1, tenk1a.unique2, tenk1a.tenthous
 (9 rows)
 
 select unique1, unique2, nextval('testseq')
@@ -387,14 +387,14 @@ select currval('testseq');
 explain (verbose, costs off)
 select unique1, unique2, generate_series(1,10)
   from tenk1 order by unique2 limit 7;
-                                                                         QUERY PLAN                                                                          
--------------------------------------------------------------------------------------------------------------------------------------------------------------
+                                                                                                                                 QUERY PLAN                                                                                                                                  
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Limit
-   Output: unique1, unique2, (generate_series(1, 10))
+   Output: tenk1a.unique1, tenk1a.unique2, (generate_series(1, 10))
    ->  ProjectSet
-         Output: unique1, unique2, generate_series(1, 10)
-         ->  Index Scan using tenk1_unique2 on public.tenk1
-               Output: unique1, unique2, two, four, ten, twenty, hundred, thousand, twothousand, fivethous, tenthous, odd, even, stringu1, stringu2, string4
+         Output: tenk1a.unique1, tenk1a.unique2, generate_series(1, 10)
+         ->  Index Scan using tenk1_unique2 on public.tenk1a
+               Output: tenk1a.unique1, tenk1a.unique2, tenk1a.two, tenk1a.four, tenk1a.ten, tenk1a.twenty, tenk1a.hundred, tenk1a.thousand, tenk1a.twothousand, tenk1a.fivethous, tenk1a.tenthous, tenk1a.odd, tenk1a.even, tenk1a.stringu1, tenk1a.stringu2, tenk1a.string4
 (6 rows)
 
 select unique1, unique2, generate_series(1,10)
@@ -413,17 +413,17 @@ select unique1, unique2, generate_series(1,10)
 explain (verbose, costs off)
 select unique1, unique2, generate_series(1,10)
   from tenk1 order by tenthous limit 7;
-                             QUERY PLAN                             
---------------------------------------------------------------------
+                                       QUERY PLAN                                        
+-----------------------------------------------------------------------------------------
  Limit
-   Output: unique1, unique2, (generate_series(1, 10)), tenthous
+   Output: tenk1a.unique1, tenk1a.unique2, (generate_series(1, 10)), tenk1a.tenthous
    ->  ProjectSet
-         Output: unique1, unique2, generate_series(1, 10), tenthous
+         Output: tenk1a.unique1, tenk1a.unique2, generate_series(1, 10), tenk1a.tenthous
          ->  Sort
-               Output: unique1, unique2, tenthous
-               Sort Key: tenk1.tenthous
-               ->  Seq Scan on public.tenk1
-                     Output: unique1, unique2, tenthous
+               Output: tenk1a.unique1, tenk1a.unique2, tenk1a.tenthous
+               Sort Key: tenk1a.tenthous
+               ->  Seq Scan on public.tenk1a
+                     Output: tenk1a.unique1, tenk1a.unique2, tenk1a.tenthous
 (9 rows)
 
 select unique1, unique2, generate_series(1,10)
@@ -483,15 +483,15 @@ order by s2 desc;
 explain (verbose, costs off)
 select sum(tenthous) as s1, sum(tenthous) + random()*0 as s2
   from tenk1 group by thousand order by thousand limit 3;
-                                                    QUERY PLAN                                                     
--------------------------------------------------------------------------------------------------------------------
+                                                               QUERY PLAN                                                               
+----------------------------------------------------------------------------------------------------------------------------------------
  Limit
-   Output: (sum(tenthous)), (((sum(tenthous))::double precision + (random() * '0'::double precision))), thousand
+   Output: (sum(tenk1a.tenthous)), (((sum(tenk1a.tenthous))::double precision + (random() * '0'::double precision))), tenk1a.thousand
    ->  GroupAggregate
-         Output: sum(tenthous), ((sum(tenthous))::double precision + (random() * '0'::double precision)), thousand
-         Group Key: tenk1.thousand
-         ->  Index Only Scan using tenk1_thous_tenthous on public.tenk1
-               Output: thousand, tenthous
+         Output: sum(tenk1a.tenthous), ((sum(tenk1a.tenthous))::double precision + (random() * '0'::double precision)), tenk1a.thousand
+         Group Key: tenk1a.thousand
+         ->  Index Only Scan using tenk1_thous_tenthous on public.tenk1a
+               Output: tenk1a.thousand, tenk1a.tenthous
 (7 rows)
 
 select sum(tenthous) as s1, sum(tenthous) + random()*0 as s2
diff --git a/src/test/regress/expected/rowtypes.out b/src/test/regress/expected/rowtypes.out
index 43b36f6..8a74e77 100644
--- a/src/test/regress/expected/rowtypes.out
+++ b/src/test/regress/expected/rowtypes.out
@@ -242,7 +242,7 @@ where (thousand, tenthous) >= (997, 5000)
 order by thousand, tenthous;
                         QUERY PLAN                         
 -----------------------------------------------------------
- Index Only Scan using tenk1_thous_tenthous on tenk1
+ Index Only Scan using tenk1_thous_tenthous on tenk1a
    Index Cond: (ROW(thousand, tenthous) >= ROW(997, 5000))
 (2 rows)
 
@@ -615,7 +615,7 @@ select row_to_json(q) from
                          QUERY PLAN                          
 -------------------------------------------------------------
  Subquery Scan on q
-   ->  Index Only Scan using tenk1_thous_tenthous on tenk1
+   ->  Index Only Scan using tenk1_thous_tenthous on tenk1a
          Index Cond: ((thousand = 42) AND (tenthous < 2000))
 (3 rows)
 
diff --git a/src/test/regress/expected/sanity_check.out b/src/test/regress/expected/sanity_check.out
index e996640..8950c98 100644
--- a/src/test/regress/expected/sanity_check.out
+++ b/src/test/regress/expected/sanity_check.out
@@ -43,6 +43,7 @@ dupindexcols|t
 e_star|f
 emp|f
 equipment_r|f
+equipment_ra|f
 f_star|f
 fast_emp4000|t
 float4_tbl|f
@@ -53,6 +54,7 @@ hash_i4_heap|t
 hash_name_heap|t
 hash_txt_heap|t
 hobbies_r|f
+hobbies_ra|f
 ihighway|t
 inet_tbl|f
 inhf|f
@@ -93,8 +95,9 @@ num_exp_sqrt|t
 num_exp_sub|t
 num_input_test|f
 num_result|f
-onek|t
+onek|f
 onek2|t
+oneka|t
 path_tbl|f
 person|f
 persons|f
@@ -182,8 +185,10 @@ sql_sizing|f
 sql_sizing_profiles|f
 stud_emp|f
 student|f
-tenk1|t
-tenk2|t
+tenk1|f
+tenk1a|t
+tenk2|f
+tenk2a|t
 test_range_excl|t
 test_range_gist|t
 test_range_spgist|t
diff --git a/src/test/regress/expected/select_distinct.out b/src/test/regress/expected/select_distinct.out
index f3696c6..3caac97 100644
--- a/src/test/regress/expected/select_distinct.out
+++ b/src/test/regress/expected/select_distinct.out
@@ -130,15 +130,15 @@ SELECT DISTINCT p.age FROM person* p ORDER BY age using >;
 EXPLAIN (VERBOSE, COSTS OFF)
 SELECT count(*) FROM
   (SELECT DISTINCT two, four, two FROM tenk1) ss;
-                       QUERY PLAN                       
---------------------------------------------------------
+                        QUERY PLAN                         
+-----------------------------------------------------------
  Aggregate
    Output: count(*)
    ->  HashAggregate
-         Output: tenk1.two, tenk1.four, tenk1.two
-         Group Key: tenk1.two, tenk1.four, tenk1.two
-         ->  Seq Scan on public.tenk1
-               Output: tenk1.two, tenk1.four, tenk1.two
+         Output: tenk1a.two, tenk1a.four, tenk1a.two
+         Group Key: tenk1a.two, tenk1a.four, tenk1a.two
+         ->  Seq Scan on public.tenk1a
+               Output: tenk1a.two, tenk1a.four, tenk1a.two
 (7 rows)
 
 SELECT count(*) FROM
diff --git a/src/test/regress/expected/select_parallel.out b/src/test/regress/expected/select_parallel.out
index 63ed6a3..3fa64b0 100644
--- a/src/test/regress/expected/select_parallel.out
+++ b/src/test/regress/expected/select_parallel.out
@@ -35,35 +35,35 @@ select count(*) from a_star;
 (1 row)
 
 -- test that parallel_restricted function doesn't run in worker
-alter table tenk1 set (parallel_workers = 4);
+alter table tenk1a set (parallel_workers = 4);
 explain (verbose, costs off)
 select parallel_restricted(unique1) from tenk1
   where stringu1 = 'GRAAAA' order by 1;
-                       QUERY PLAN                        
----------------------------------------------------------
+                        QUERY PLAN                        
+----------------------------------------------------------
  Sort
-   Output: (parallel_restricted(unique1))
-   Sort Key: (parallel_restricted(tenk1.unique1))
+   Output: (parallel_restricted(tenk1a.unique1))
+   Sort Key: (parallel_restricted(tenk1a.unique1))
    ->  Gather
-         Output: parallel_restricted(unique1)
+         Output: parallel_restricted(tenk1a.unique1)
          Workers Planned: 4
-         ->  Parallel Seq Scan on public.tenk1
-               Output: unique1
-               Filter: (tenk1.stringu1 = 'GRAAAA'::name)
+         ->  Parallel Seq Scan on public.tenk1a
+               Output: tenk1a.unique1
+               Filter: (tenk1a.stringu1 = 'GRAAAA'::name)
 (9 rows)
 
 -- test parallel plan when group by expression is in target list.
 explain (costs off)
 	select length(stringu1) from tenk1 group by length(stringu1);
-                    QUERY PLAN                     
----------------------------------------------------
+                        QUERY PLAN                        
+----------------------------------------------------------
  Finalize HashAggregate
-   Group Key: (length((stringu1)::text))
+   Group Key: (length((tenk1a.stringu1)::text))
    ->  Gather
          Workers Planned: 4
          ->  Partial HashAggregate
-               Group Key: length((stringu1)::text)
-               ->  Parallel Seq Scan on tenk1
+               Group Key: length((tenk1a.stringu1)::text)
+               ->  Parallel Seq Scan on tenk1a
 (7 rows)
 
 select length(stringu1) from tenk1 group by length(stringu1);
@@ -74,17 +74,17 @@ select length(stringu1) from tenk1 group by length(stringu1);
 
 explain (costs off)
 	select stringu1, count(*) from tenk1 group by stringu1 order by stringu1;
-                     QUERY PLAN                     
-----------------------------------------------------
+                     QUERY PLAN                      
+-----------------------------------------------------
  Sort
-   Sort Key: stringu1
+   Sort Key: tenk1a.stringu1
    ->  Finalize HashAggregate
-         Group Key: stringu1
+         Group Key: tenk1a.stringu1
          ->  Gather
                Workers Planned: 4
                ->  Partial HashAggregate
-                     Group Key: stringu1
-                     ->  Parallel Seq Scan on tenk1
+                     Group Key: tenk1a.stringu1
+                     ->  Parallel Seq Scan on tenk1a
 (9 rows)
 
 -- test that parallel plan for aggregates is not selected when
@@ -92,25 +92,25 @@ explain (costs off)
 explain (costs off)
 	select  sum(parallel_restricted(unique1)) from tenk1
 	group by(parallel_restricted(unique1));
-                            QUERY PLAN                             
--------------------------------------------------------------------
+                             QUERY PLAN                             
+--------------------------------------------------------------------
  HashAggregate
-   Group Key: parallel_restricted(unique1)
+   Group Key: parallel_restricted(tenk1a.unique1)
    ->  Gather
          Workers Planned: 4
-         ->  Parallel Index Only Scan using tenk1_unique1 on tenk1
+         ->  Parallel Index Only Scan using tenk1_unique1 on tenk1a
 (5 rows)
 
 -- test prepared statement
 prepare tenk1_count(integer) As select  count((unique1)) from tenk1 where hundred > $1;
 explain (costs off) execute tenk1_count(1);
-                  QUERY PLAN                  
-----------------------------------------------
+                  QUERY PLAN                   
+-----------------------------------------------
  Finalize Aggregate
    ->  Gather
          Workers Planned: 4
          ->  Partial Aggregate
-               ->  Parallel Seq Scan on tenk1
+               ->  Parallel Seq Scan on tenk1a
                      Filter: (hundred > 1)
 (6 rows)
 
@@ -122,7 +122,7 @@ execute tenk1_count(1);
 
 deallocate tenk1_count;
 -- test parallel plans for queries containing un-correlated subplans.
-alter table tenk2 set (parallel_workers = 0);
+alter table tenk2a set (parallel_workers = 0);
 explain (costs off)
 	select count(*) from tenk1 where (two, four) not in
 	(select hundred, thousand from tenk2 where thousand > 100);
@@ -132,10 +132,10 @@ explain (costs off)
    ->  Gather
          Workers Planned: 4
          ->  Partial Aggregate
-               ->  Parallel Seq Scan on tenk1
+               ->  Parallel Seq Scan on tenk1a
                      Filter: (NOT (hashed SubPlan 1))
                      SubPlan 1
-                       ->  Seq Scan on tenk2
+                       ->  Seq Scan on tenk2a
                              Filter: (thousand > 100)
 (9 rows)
 
@@ -152,10 +152,10 @@ explain (costs off)
 	(select ten from tenk2);
              QUERY PLAN             
 ------------------------------------
- Seq Scan on tenk1
+ Seq Scan on tenk1a
    Filter: (NOT (hashed SubPlan 1))
    SubPlan 1
-     ->  Seq Scan on tenk2
+     ->  Seq Scan on tenk2a
 (4 rows)
 
 alter table tenk2 reset (parallel_workers);
@@ -164,13 +164,13 @@ set enable_seqscan to off;
 set enable_bitmapscan to off;
 explain (costs off)
 	select  count((unique1)) from tenk1 where hundred > 1;
-                             QUERY PLAN                             
---------------------------------------------------------------------
+                             QUERY PLAN                              
+---------------------------------------------------------------------
  Finalize Aggregate
    ->  Gather
          Workers Planned: 4
          ->  Partial Aggregate
-               ->  Parallel Index Scan using tenk1_hundred on tenk1
+               ->  Parallel Index Scan using tenk1_hundred on tenk1a
                      Index Cond: (hundred > 1)
 (6 rows)
 
@@ -183,13 +183,13 @@ select  count((unique1)) from tenk1 where hundred > 1;
 -- test parallel index-only scans.
 explain (costs off)
 	select  count(*) from tenk1 where thousand > 95;
-                                   QUERY PLAN                                   
---------------------------------------------------------------------------------
+                                   QUERY PLAN                                    
+---------------------------------------------------------------------------------
  Finalize Aggregate
    ->  Gather
          Workers Planned: 4
          ->  Partial Aggregate
-               ->  Parallel Index Only Scan using tenk1_thous_tenthous on tenk1
+               ->  Parallel Index Only Scan using tenk1_thous_tenthous on tenk1a
                      Index Cond: (thousand > 95)
 (6 rows)
 
@@ -205,15 +205,15 @@ explain (costs off)
 select * from
   (select count(unique1) from tenk1 where hundred > 10) ss
   right join (values (1),(2),(3)) v(x) on true;
-                                QUERY PLAN                                
---------------------------------------------------------------------------
+                                QUERY PLAN                                 
+---------------------------------------------------------------------------
  Nested Loop Left Join
    ->  Values Scan on "*VALUES*"
    ->  Finalize Aggregate
          ->  Gather
                Workers Planned: 4
                ->  Partial Aggregate
-                     ->  Parallel Index Scan using tenk1_hundred on tenk1
+                     ->  Parallel Index Scan using tenk1_hundred on tenk1a
                            Index Cond: (hundred > 10)
 (8 rows)
 
@@ -231,15 +231,15 @@ explain (costs off)
 select * from
   (select count(*) from tenk1 where thousand > 99) ss
   right join (values (1),(2),(3)) v(x) on true;
-                                      QUERY PLAN                                      
---------------------------------------------------------------------------------------
+                                      QUERY PLAN                                       
+---------------------------------------------------------------------------------------
  Nested Loop Left Join
    ->  Values Scan on "*VALUES*"
    ->  Finalize Aggregate
          ->  Gather
                Workers Planned: 4
                ->  Partial Aggregate
-                     ->  Parallel Index Only Scan using tenk1_thous_tenthous on tenk1
+                     ->  Parallel Index Only Scan using tenk1_thous_tenthous on tenk1a
                            Index Cond: (thousand > 99)
 (8 rows)
 
@@ -275,11 +275,11 @@ explain (costs off)
 ------------------------------------------------------------
  Aggregate
    ->  Nested Loop
-         ->  Seq Scan on tenk2
+         ->  Seq Scan on tenk2a
                Filter: (thousand = 0)
          ->  Gather
                Workers Planned: 4
-               ->  Parallel Bitmap Heap Scan on tenk1
+               ->  Parallel Bitmap Heap Scan on tenk1a
                      Recheck Cond: (hundred > 1)
                      ->  Bitmap Index Scan on tenk1_hundred
                            Index Cond: (hundred > 1)
@@ -313,16 +313,16 @@ set enable_hashjoin to off;
 set enable_nestloop to off;
 explain (costs off)
 	select  count(*) from tenk1, tenk2 where tenk1.unique1 = tenk2.unique1;
-                                  QUERY PLAN                                   
--------------------------------------------------------------------------------
+                                   QUERY PLAN                                   
+--------------------------------------------------------------------------------
  Finalize Aggregate
    ->  Gather
          Workers Planned: 4
          ->  Partial Aggregate
                ->  Merge Join
-                     Merge Cond: (tenk1.unique1 = tenk2.unique1)
-                     ->  Parallel Index Only Scan using tenk1_unique1 on tenk1
-                     ->  Index Only Scan using tenk2_unique1 on tenk2
+                     Merge Cond: (tenk1a.unique1 = tenk2a.unique1)
+                     ->  Parallel Index Only Scan using tenk1_unique1 on tenk1a
+                     ->  Index Only Scan using tenk2_unique1 on tenk2a
 (8 rows)
 
 select  count(*) from tenk1, tenk2 where tenk1.unique1 = tenk2.unique1;
@@ -337,17 +337,17 @@ reset enable_nestloop;
 set enable_hashagg = false;
 explain (costs off)
    select count(*) from tenk1 group by twenty;
-                     QUERY PLAN                     
-----------------------------------------------------
+                     QUERY PLAN                      
+-----------------------------------------------------
  Finalize GroupAggregate
-   Group Key: twenty
+   Group Key: tenk1a.twenty
    ->  Gather Merge
          Workers Planned: 4
          ->  Partial GroupAggregate
-               Group Key: twenty
+               Group Key: tenk1a.twenty
                ->  Sort
-                     Sort Key: twenty
-                     ->  Parallel Seq Scan on tenk1
+                     Sort Key: tenk1a.twenty
+                     ->  Parallel Seq Scan on tenk1a
 (9 rows)
 
 select count(*) from tenk1 group by twenty;
@@ -384,19 +384,19 @@ end;
 $$ language plpgsql PARALLEL SAFE;
 explain (costs off, verbose)
     select ten, simple_func(ten) from tenk1 where ten < 100 order by ten;
-                     QUERY PLAN                      
------------------------------------------------------
+                      QUERY PLAN                      
+------------------------------------------------------
  Gather Merge
-   Output: ten, (simple_func(ten))
+   Output: tenk1a.ten, (simple_func(tenk1a.ten))
    Workers Planned: 4
    ->  Result
-         Output: ten, simple_func(ten)
+         Output: tenk1a.ten, simple_func(tenk1a.ten)
          ->  Sort
-               Output: ten
-               Sort Key: tenk1.ten
-               ->  Parallel Seq Scan on public.tenk1
-                     Output: ten
-                     Filter: (tenk1.ten < 100)
+               Output: tenk1a.ten
+               Sort Key: tenk1a.ten
+               ->  Parallel Seq Scan on public.tenk1a
+                     Output: tenk1a.ten
+                     Filter: (tenk1a.ten < 100)
 (11 rows)
 
 drop function simple_func(integer);
@@ -407,19 +407,19 @@ select * from
   (select string4, count(unique2)
    from tenk1 group by string4 order by string4) ss
   right join (values (1),(2),(3)) v(x) on true;
-                        QUERY PLAN                        
-----------------------------------------------------------
+                        QUERY PLAN                         
+-----------------------------------------------------------
  Nested Loop Left Join
    ->  Values Scan on "*VALUES*"
    ->  Finalize GroupAggregate
-         Group Key: tenk1.string4
+         Group Key: tenk1a.string4
          ->  Gather Merge
                Workers Planned: 4
                ->  Partial GroupAggregate
-                     Group Key: tenk1.string4
+                     Group Key: tenk1a.string4
                      ->  Sort
-                           Sort Key: tenk1.string4
-                           ->  Parallel Seq Scan on tenk1
+                           Sort Key: tenk1a.string4
+                           ->  Parallel Seq Scan on tenk1a
 (11 rows)
 
 select * from
@@ -447,13 +447,13 @@ reset enable_hashagg;
 -- check parallelized int8 aggregate (bug #14897)
 explain (costs off)
 select avg(unique1::int8) from tenk1;
-                               QUERY PLAN                                
--------------------------------------------------------------------------
+                                QUERY PLAN                                
+--------------------------------------------------------------------------
  Finalize Aggregate
    ->  Gather
          Workers Planned: 4
          ->  Partial Aggregate
-               ->  Parallel Index Only Scan using tenk1_unique1 on tenk1
+               ->  Parallel Index Only Scan using tenk1_unique1 on tenk1a
 (5 rows)
 
 select avg(unique1::int8) from tenk1;
@@ -465,14 +465,14 @@ select avg(unique1::int8) from tenk1;
 -- gather merge test with a LIMIT
 explain (costs off)
   select fivethous from tenk1 order by fivethous limit 4;
-                  QUERY PLAN                  
-----------------------------------------------
+                  QUERY PLAN                   
+-----------------------------------------------
  Limit
    ->  Gather Merge
          Workers Planned: 4
          ->  Sort
-               Sort Key: fivethous
-               ->  Parallel Seq Scan on tenk1
+               Sort Key: tenk1a.fivethous
+               ->  Parallel Seq Scan on tenk1a
 (6 rows)
 
 select fivethous from tenk1 order by fivethous limit 4;
@@ -488,14 +488,14 @@ select fivethous from tenk1 order by fivethous limit 4;
 set max_parallel_workers = 0;
 explain (costs off)
    select string4 from tenk1 order by string4 limit 5;
-                  QUERY PLAN                  
-----------------------------------------------
+                  QUERY PLAN                   
+-----------------------------------------------
  Limit
    ->  Gather Merge
          Workers Planned: 4
          ->  Sort
-               Sort Key: string4
-               ->  Parallel Seq Scan on tenk1
+               Sort Key: tenk1a.string4
+               ->  Parallel Seq Scan on tenk1a
 (6 rows)
 
 select string4 from tenk1 order by string4 limit 5;
@@ -513,12 +513,12 @@ SAVEPOINT settings;
 SET LOCAL force_parallel_mode = 1;
 explain (costs off)
   select stringu1::int2 from tenk1 where unique1 = 1;
-                  QUERY PLAN                   
------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Gather
    Workers Planned: 1
    Single Copy: true
-   ->  Index Scan using tenk1_unique1 on tenk1
+   ->  Index Scan using tenk1_unique1 on tenk1a
          Index Cond: (unique1 = 1)
 (5 rows)
 
@@ -571,12 +571,12 @@ reset role;
 SAVEPOINT settings;
 SET LOCAL force_parallel_mode = 1;
 EXPLAIN (analyze, timing off, summary off, costs off) SELECT * FROM tenk1;
-                         QUERY PLAN                          
--------------------------------------------------------------
+                          QUERY PLAN                          
+--------------------------------------------------------------
  Gather (actual rows=10000 loops=1)
    Workers Planned: 4
    Workers Launched: 4
-   ->  Parallel Seq Scan on tenk1 (actual rows=2000 loops=5)
+   ->  Parallel Seq Scan on tenk1a (actual rows=2000 loops=5)
 (4 rows)
 
 ROLLBACK TO SAVEPOINT settings;
diff --git a/src/test/regress/expected/stats.out b/src/test/regress/expected/stats.out
index 991c287..c44bb26 100644
--- a/src/test/regress/expected/stats.out
+++ b/src/test/regress/expected/stats.out
@@ -24,7 +24,7 @@ SELECT t.seq_scan, t.seq_tup_read, t.idx_scan, t.idx_tup_fetch,
        pg_stat_get_snapshot_timestamp() as snap_ts
   FROM pg_catalog.pg_stat_user_tables AS t,
        pg_catalog.pg_statio_user_tables AS b
- WHERE t.relname='tenk2' AND b.relname='tenk2';
+ WHERE t.relname='tenk2a' AND b.relname='tenk2a';
 -- function to wait for counters to advance
 create function wait_for_stats() returns void as $$
 declare
@@ -45,12 +45,12 @@ begin
     -- check to see if seqscan has been sensed
     SELECT (st.seq_scan >= pr.seq_scan + 1) INTO updated1
       FROM pg_stat_user_tables AS st, pg_class AS cl, prevstats AS pr
-     WHERE st.relname='tenk2' AND cl.relname='tenk2';
+     WHERE st.relname='tenk2a' AND cl.relname='tenk2a';
 
     -- check to see if indexscan has been sensed
     SELECT (st.idx_scan >= pr.idx_scan + 1) INTO updated2
       FROM pg_stat_user_tables AS st, pg_class AS cl, prevstats AS pr
-     WHERE st.relname='tenk2' AND cl.relname='tenk2';
+     WHERE st.relname='tenk2a' AND cl.relname='tenk2a';
 
     -- check to see if all updates have been sensed
     SELECT (n_tup_ins > 0) INTO updated3
@@ -177,7 +177,7 @@ SELECT st.seq_scan >= pr.seq_scan + 1,
        st.idx_scan >= pr.idx_scan + 1,
        st.idx_tup_fetch >= pr.idx_tup_fetch + 1
   FROM pg_stat_user_tables AS st, pg_class AS cl, prevstats AS pr
- WHERE st.relname='tenk2' AND cl.relname='tenk2';
+ WHERE st.relname='tenk2a' AND cl.relname='tenk2a';
  ?column? | ?column? | ?column? | ?column? 
 ----------+----------+----------+----------
  t        | t        | t        | t
@@ -186,7 +186,7 @@ SELECT st.seq_scan >= pr.seq_scan + 1,
 SELECT st.heap_blks_read + st.heap_blks_hit >= pr.heap_blks + cl.relpages,
        st.idx_blks_read + st.idx_blks_hit >= pr.idx_blks + 1
   FROM pg_statio_user_tables AS st, pg_class AS cl, prevstats AS pr
- WHERE st.relname='tenk2' AND cl.relname='tenk2';
+ WHERE st.relname='tenk2a' AND cl.relname='tenk2a';
  ?column? | ?column? 
 ----------+----------
  t        | t
diff --git a/src/test/regress/expected/subselect.out b/src/test/regress/expected/subselect.out
index 992d29b..e01c466 100644
--- a/src/test/regress/expected/subselect.out
+++ b/src/test/regress/expected/subselect.out
@@ -854,10 +854,10 @@ select * from int4_tbl where
    Join Filter: (CASE WHEN (hashed SubPlan 1) THEN int4_tbl.f1 ELSE NULL::integer END = b.ten)
    ->  Seq Scan on public.int4_tbl
          Output: int4_tbl.f1
-   ->  Seq Scan on public.tenk1 b
+   ->  Seq Scan on public.tenk1a b
          Output: b.unique1, b.unique2, b.two, b.four, b.ten, b.twenty, b.hundred, b.thousand, b.twothousand, b.fivethous, b.tenthous, b.odd, b.even, b.stringu1, b.stringu2, b.string4
    SubPlan 1
-     ->  Index Only Scan using tenk1_unique1 on public.tenk1 a
+     ->  Index Only Scan using tenk1_unique1 on public.tenk1a a
            Output: a.unique1
 (10 rows)
 
diff --git a/src/test/regress/expected/tablesample.out b/src/test/regress/expected/tablesample.out
index d379414..1074473 100644
--- a/src/test/regress/expected/tablesample.out
+++ b/src/test/regress/expected/tablesample.out
@@ -257,7 +257,7 @@ select pct, count(unique1) from
    Group Key: "*VALUES*".column1
    ->  Nested Loop
          ->  Values Scan on "*VALUES*"
-         ->  Sample Scan on tenk1
+         ->  Sample Scan on tenk1a
                Sampling: bernoulli ("*VALUES*".column1)
 (6 rows)
 
diff --git a/src/test/regress/expected/union.out b/src/test/regress/expected/union.out
index 11d30a3..d12c3f1 100644
--- a/src/test/regress/expected/union.out
+++ b/src/test/regress/expected/union.out
@@ -350,16 +350,16 @@ set enable_hashagg to on;
 explain (costs off)
 select count(*) from
   ( select unique1 from tenk1 intersect select fivethous from tenk1 ) ss;
-                                     QUERY PLAN                                     
-------------------------------------------------------------------------------------
+                                      QUERY PLAN                                      
+--------------------------------------------------------------------------------------
  Aggregate
    ->  Subquery Scan on ss
          ->  HashSetOp Intersect
                ->  Append
                      ->  Subquery Scan on "*SELECT* 2"
-                           ->  Seq Scan on tenk1
+                           ->  Seq Scan on tenk1a
                      ->  Subquery Scan on "*SELECT* 1"
-                           ->  Index Only Scan using tenk1_unique1 on tenk1 tenk1_1
+                           ->  Index Only Scan using tenk1_unique1 on tenk1a tenk1a_1
 (8 rows)
 
 select count(*) from
@@ -371,14 +371,14 @@ select count(*) from
 
 explain (costs off)
 select unique1 from tenk1 except select unique2 from tenk1 where unique2 != 10;
-                               QUERY PLAN                               
-------------------------------------------------------------------------
+                                QUERY PLAN                                
+--------------------------------------------------------------------------
  HashSetOp Except
    ->  Append
          ->  Subquery Scan on "*SELECT* 1"
-               ->  Index Only Scan using tenk1_unique1 on tenk1
+               ->  Index Only Scan using tenk1_unique1 on tenk1a
          ->  Subquery Scan on "*SELECT* 2"
-               ->  Index Only Scan using tenk1_unique2 on tenk1 tenk1_1
+               ->  Index Only Scan using tenk1_unique2 on tenk1a tenk1a_1
                      Filter: (unique2 <> 10)
 (7 rows)
 
@@ -392,8 +392,8 @@ set enable_hashagg to off;
 explain (costs off)
 select count(*) from
   ( select unique1 from tenk1 intersect select fivethous from tenk1 ) ss;
-                                        QUERY PLAN                                        
-------------------------------------------------------------------------------------------
+                                         QUERY PLAN                                         
+--------------------------------------------------------------------------------------------
  Aggregate
    ->  Subquery Scan on ss
          ->  SetOp Intersect
@@ -401,9 +401,9 @@ select count(*) from
                      Sort Key: "*SELECT* 2".fivethous
                      ->  Append
                            ->  Subquery Scan on "*SELECT* 2"
-                                 ->  Seq Scan on tenk1
+                                 ->  Seq Scan on tenk1a
                            ->  Subquery Scan on "*SELECT* 1"
-                                 ->  Index Only Scan using tenk1_unique1 on tenk1 tenk1_1
+                                 ->  Index Only Scan using tenk1_unique1 on tenk1a tenk1a_1
 (10 rows)
 
 select count(*) from
@@ -415,16 +415,16 @@ select count(*) from
 
 explain (costs off)
 select unique1 from tenk1 except select unique2 from tenk1 where unique2 != 10;
-                                  QUERY PLAN                                  
-------------------------------------------------------------------------------
+                                   QUERY PLAN                                   
+--------------------------------------------------------------------------------
  SetOp Except
    ->  Sort
          Sort Key: "*SELECT* 1".unique1
          ->  Append
                ->  Subquery Scan on "*SELECT* 1"
-                     ->  Index Only Scan using tenk1_unique1 on tenk1
+                     ->  Index Only Scan using tenk1_unique1 on tenk1a
                ->  Subquery Scan on "*SELECT* 2"
-                     ->  Index Only Scan using tenk1_unique2 on tenk1 tenk1_1
+                     ->  Index Only Scan using tenk1_unique2 on tenk1a tenk1a_1
                            Filter: (unique2 <> 10)
 (9 rows)
 
@@ -697,9 +697,9 @@ explain (costs off)
    UNION ALL
    SELECT 2 AS t, * FROM tenk1 b) c
  WHERE t = 2;
-     QUERY PLAN      
----------------------
- Seq Scan on tenk1 b
+      QUERY PLAN      
+----------------------
+ Seq Scan on tenk1a b
 (1 row)
 
 -- Test that we push quals into UNION sub-selects only when it's safe
diff --git a/src/test/regress/expected/window.out b/src/test/regress/expected/window.out
index 19f909f..890941f 100644
--- a/src/test/regress/expected/window.out
+++ b/src/test/regress/expected/window.out
@@ -619,12 +619,12 @@ explain (costs off)
 select first_value(max(x)) over (), y
   from (select unique1 as x, ten+four as y from tenk1) ss
   group by y;
-                 QUERY PLAN                  
----------------------------------------------
+                  QUERY PLAN                   
+-----------------------------------------------
  WindowAgg
    ->  HashAggregate
-         Group Key: (tenk1.ten + tenk1.four)
-         ->  Seq Scan on tenk1
+         Group Key: (tenk1a.ten + tenk1a.four)
+         ->  Seq Scan on tenk1a
 (4 rows)
 
 -- test non-default frame specifications
diff --git a/src/test/regress/expected/write_parallel.out b/src/test/regress/expected/write_parallel.out
index 0c4da25..86fc1d2 100644
--- a/src/test/regress/expected/write_parallel.out
+++ b/src/test/regress/expected/write_parallel.out
@@ -15,15 +15,15 @@ set max_parallel_workers_per_gather=4;
 --
 explain (costs off) create table parallel_write as
     select length(stringu1) from tenk1 group by length(stringu1);
-                    QUERY PLAN                     
----------------------------------------------------
+                        QUERY PLAN                        
+----------------------------------------------------------
  Finalize HashAggregate
-   Group Key: (length((stringu1)::text))
+   Group Key: (length((tenk1a.stringu1)::text))
    ->  Gather
          Workers Planned: 4
          ->  Partial HashAggregate
-               Group Key: length((stringu1)::text)
-               ->  Parallel Seq Scan on tenk1
+               Group Key: length((tenk1a.stringu1)::text)
+               ->  Parallel Seq Scan on tenk1a
 (7 rows)
 
 create table parallel_write as
@@ -31,15 +31,15 @@ create table parallel_write as
 drop table parallel_write;
 explain (costs off) select length(stringu1) into parallel_write
     from tenk1 group by length(stringu1);
-                    QUERY PLAN                     
----------------------------------------------------
+                        QUERY PLAN                        
+----------------------------------------------------------
  Finalize HashAggregate
-   Group Key: (length((stringu1)::text))
+   Group Key: (length((tenk1a.stringu1)::text))
    ->  Gather
          Workers Planned: 4
          ->  Partial HashAggregate
-               Group Key: length((stringu1)::text)
-               ->  Parallel Seq Scan on tenk1
+               Group Key: length((tenk1a.stringu1)::text)
+               ->  Parallel Seq Scan on tenk1a
 (7 rows)
 
 select length(stringu1) into parallel_write
@@ -47,15 +47,15 @@ select length(stringu1) into parallel_write
 drop table parallel_write;
 explain (costs off) create materialized view parallel_mat_view as
     select length(stringu1) from tenk1 group by length(stringu1);
-                    QUERY PLAN                     
----------------------------------------------------
+                        QUERY PLAN                        
+----------------------------------------------------------
  Finalize HashAggregate
-   Group Key: (length((stringu1)::text))
+   Group Key: (length((tenk1a.stringu1)::text))
    ->  Gather
          Workers Planned: 4
          ->  Partial HashAggregate
-               Group Key: length((stringu1)::text)
-               ->  Parallel Seq Scan on tenk1
+               Group Key: length((tenk1a.stringu1)::text)
+               ->  Parallel Seq Scan on tenk1a
 (7 rows)
 
 create materialized view parallel_mat_view as
@@ -63,15 +63,15 @@ create materialized view parallel_mat_view as
 drop materialized view parallel_mat_view;
 prepare prep_stmt as select length(stringu1) from tenk1 group by length(stringu1);
 explain (costs off) create table parallel_write as execute prep_stmt;
-                    QUERY PLAN                     
----------------------------------------------------
+                        QUERY PLAN                        
+----------------------------------------------------------
  Finalize HashAggregate
-   Group Key: (length((stringu1)::text))
+   Group Key: (length((tenk1a.stringu1)::text))
    ->  Gather
          Workers Planned: 4
          ->  Partial HashAggregate
-               Group Key: length((stringu1)::text)
-               ->  Parallel Seq Scan on tenk1
+               Group Key: length((tenk1a.stringu1)::text)
+               ->  Parallel Seq Scan on tenk1a
 (7 rows)
 
 create table parallel_write as execute prep_stmt;
diff --git a/src/test/regress/input/copy.source b/src/test/regress/input/copy.source
index cb13606..35ad2d2 100644
--- a/src/test/regress/input/copy.source
+++ b/src/test/regress/input/copy.source
@@ -9,7 +9,7 @@ COPY aggtest FROM '@abs_srcdir@/data/agg.data';
 
 COPY onek FROM '@abs_srcdir@/data/onek.data';
 
-COPY onek TO '@abs_builddir@/results/onek.data';
+COPY oneka TO '@abs_builddir@/results/onek.data';
 
 DELETE FROM onek;
 
diff --git a/src/test/regress/input/misc.source b/src/test/regress/input/misc.source
index b1dbc57..1b4c0c8 100644
--- a/src/test/regress/input/misc.source
+++ b/src/test/regress/input/misc.source
@@ -51,7 +51,7 @@ DROP TABLE tmp;
 --
 -- copy
 --
-COPY onek TO '@abs_builddir@/results/onek.data';
+COPY oneka TO '@abs_builddir@/results/onek.data';
 
 DELETE FROM onek;
 
diff --git a/src/test/regress/output/copy.source b/src/test/regress/output/copy.source
index b7e372d..c3faa8c 100644
--- a/src/test/regress/output/copy.source
+++ b/src/test/regress/output/copy.source
@@ -6,7 +6,7 @@
 --
 COPY aggtest FROM '@abs_srcdir@/data/agg.data';
 COPY onek FROM '@abs_srcdir@/data/onek.data';
-COPY onek TO '@abs_builddir@/results/onek.data';
+COPY oneka TO '@abs_builddir@/results/onek.data';
 DELETE FROM onek;
 COPY onek FROM '@abs_builddir@/results/onek.data';
 COPY tenk1 FROM '@abs_srcdir@/data/tenk.data';
diff --git a/src/test/regress/output/misc.source b/src/test/regress/output/misc.source
index b9595cc..ed56674 100644
--- a/src/test/regress/output/misc.source
+++ b/src/test/regress/output/misc.source
@@ -41,7 +41,7 @@ DROP TABLE tmp;
 --
 -- copy
 --
-COPY onek TO '@abs_builddir@/results/onek.data';
+COPY oneka TO '@abs_builddir@/results/onek.data';
 DELETE FROM onek;
 COPY onek FROM '@abs_builddir@/results/onek.data';
 SELECT unique1 FROM onek WHERE unique1 < 2 ORDER BY unique1;
diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql
index 02a33ca..9c6616f 100644
--- a/src/test/regress/sql/alter_table.sql
+++ b/src/test/regress/sql/alter_table.sql
@@ -227,21 +227,21 @@ alter table stud_emp rename to pg_toast_stud_emp;
 alter table pg_toast_stud_emp rename to stud_emp;
 
 -- renaming index should rename constraint as well
-ALTER TABLE onek ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1);
+ALTER TABLE oneka ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1);
 ALTER INDEX onek_unique1_constraint RENAME TO onek_unique1_constraint_foo;
-ALTER TABLE onek DROP CONSTRAINT onek_unique1_constraint_foo;
+ALTER TABLE oneka DROP CONSTRAINT onek_unique1_constraint_foo;
 
 -- renaming constraint
-ALTER TABLE onek ADD CONSTRAINT onek_check_constraint CHECK (unique1 >= 0);
-ALTER TABLE onek RENAME CONSTRAINT onek_check_constraint TO onek_check_constraint_foo;
-ALTER TABLE onek DROP CONSTRAINT onek_check_constraint_foo;
+ALTER TABLE oneka ADD CONSTRAINT onek_check_constraint CHECK (unique1 >= 0);
+ALTER TABLE oneka RENAME CONSTRAINT onek_check_constraint TO onek_check_constraint_foo;
+ALTER TABLE oneka DROP CONSTRAINT onek_check_constraint_foo;
 
 -- renaming constraint should rename index as well
-ALTER TABLE onek ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1);
+ALTER TABLE oneka ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1);
 DROP INDEX onek_unique1_constraint;  -- to see whether it's there
-ALTER TABLE onek RENAME CONSTRAINT onek_unique1_constraint TO onek_unique1_constraint_foo;
+ALTER TABLE oneka RENAME CONSTRAINT onek_unique1_constraint TO onek_unique1_constraint_foo;
 DROP INDEX onek_unique1_constraint_foo;  -- to see whether it's there
-ALTER TABLE onek DROP CONSTRAINT onek_unique1_constraint_foo;
+ALTER TABLE oneka DROP CONSTRAINT onek_unique1_constraint_foo;
 
 -- renaming constraints vs. inheritance
 CREATE TABLE constraint_rename_test (a int CONSTRAINT con1 CHECK (a > 0), b int, c int);
diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql
index a45e8eb..d2b90ac 100644
--- a/src/test/regress/sql/create_index.sql
+++ b/src/test/regress/sql/create_index.sql
@@ -6,31 +6,31 @@
 --
 -- BTREE
 --
-CREATE INDEX onek_unique1 ON onek USING btree(unique1 int4_ops);
+CREATE INDEX onek_unique1 ON oneka USING btree(unique1 int4_ops);
 
-CREATE INDEX IF NOT EXISTS onek_unique1 ON onek USING btree(unique1 int4_ops);
+CREATE INDEX IF NOT EXISTS onek_unique1 ON oneka USING btree(unique1 int4_ops);
 
-CREATE INDEX IF NOT EXISTS ON onek USING btree(unique1 int4_ops);
+CREATE INDEX IF NOT EXISTS ON oneka USING btree(unique1 int4_ops);
 
-CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops);
+CREATE INDEX onek_unique2 ON oneka USING btree(unique2 int4_ops);
 
-CREATE INDEX onek_hundred ON onek USING btree(hundred int4_ops);
+CREATE INDEX onek_hundred ON oneka USING btree(hundred int4_ops);
 
-CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 name_ops);
+CREATE INDEX onek_stringu1 ON oneka USING btree(stringu1 name_ops);
 
-CREATE INDEX tenk1_unique1 ON tenk1 USING btree(unique1 int4_ops);
+CREATE INDEX tenk1_unique1 ON tenk1a USING btree(unique1 int4_ops);
 
-CREATE INDEX tenk1_unique2 ON tenk1 USING btree(unique2 int4_ops);
+CREATE INDEX tenk1_unique2 ON tenk1a USING btree(unique2 int4_ops);
 
-CREATE INDEX tenk1_hundred ON tenk1 USING btree(hundred int4_ops);
+CREATE INDEX tenk1_hundred ON tenk1a USING btree(hundred int4_ops);
 
-CREATE INDEX tenk1_thous_tenthous ON tenk1 (thousand, tenthous);
+CREATE INDEX tenk1_thous_tenthous ON tenk1a (thousand, tenthous);
 
-CREATE INDEX tenk2_unique1 ON tenk2 USING btree(unique1 int4_ops);
+CREATE INDEX tenk2_unique1 ON tenk2a USING btree(unique1 int4_ops);
 
-CREATE INDEX tenk2_unique2 ON tenk2 USING btree(unique2 int4_ops);
+CREATE INDEX tenk2_unique2 ON tenk2a USING btree(unique2 int4_ops);
 
-CREATE INDEX tenk2_hundred ON tenk2 USING btree(hundred int4_ops);
+CREATE INDEX tenk2_hundred ON tenk2a USING btree(hundred int4_ops);
 
 CREATE INDEX rix ON road USING btree (name text_ops);
 
@@ -693,7 +693,7 @@ DROP TABLE unlogged_hash_table;
 -- Test hash index build tuplesorting.  Force hash tuplesort using low
 -- maintenance_work_mem setting and fillfactor:
 SET maintenance_work_mem = '1MB';
-CREATE INDEX hash_tuplesort_idx ON tenk1 USING hash (stringu1 name_ops) WITH (fillfactor = 10);
+CREATE INDEX hash_tuplesort_idx ON tenk1a USING hash (stringu1 name_ops) WITH (fillfactor = 10);
 EXPLAIN (COSTS OFF)
 SELECT count(*) FROM tenk1 WHERE stringu1 = 'TVAAAA';
 SELECT count(*) FROM tenk1 WHERE stringu1 = 'TVAAAA';
diff --git a/src/test/regress/sql/create_table.sql b/src/test/regress/sql/create_table.sql
index b77b476..57f0d6f 100644
--- a/src/test/regress/sql/create_table.sql
+++ b/src/test/regress/sql/create_table.sql
@@ -8,12 +8,18 @@
 CREATE TABLE hobbies_r (
 	name		text,
 	person 		text
-);
+) PARTITION BY RANGE (name);
+
+CREATE TABLE hobbies_ra PARTITION OF hobbies_r FOR VALUES FROM (MINVALUE) TO (MAXVALUE);
+
 
 CREATE TABLE equipment_r (
 	name 		text,
 	hobby		text
-);
+) PARTITION BY RANGE (name);
+
+CREATE TABLE equipment_ra PARTITION OF equipment_r FOR VALUES FROM (MINVALUE) TO (MAXVALUE);
+
 
 CREATE TABLE onek (
 	unique1		int4,
@@ -32,7 +38,10 @@ CREATE TABLE onek (
 	stringu1	name,
 	stringu2	name,
 	string4		name
-);
+) PARTITION BY RANGE (unique1);
+
+CREATE TABLE oneka PARTITION OF onek FOR VALUES FROM (MINVALUE) TO (MAXVALUE);
+
 
 CREATE TABLE tenk1 (
 	unique1		int4,
@@ -51,7 +60,9 @@ CREATE TABLE tenk1 (
 	stringu1	name,
 	stringu2	name,
 	string4		name
-) WITH OIDS;
+) PARTITION BY RANGE (unique1) WITH OIDS;
+
+CREATE TABLE tenk1a PARTITION OF tenk1 FOR VALUES FROM (MINVALUE) TO (MAXVALUE);
 
 CREATE TABLE tenk2 (
 	unique1 	int4,
@@ -70,7 +81,10 @@ CREATE TABLE tenk2 (
 	stringu1	name,
 	stringu2	name,
 	string4		name
-);
+) PARTITION BY RANGE (unique1);
+
+CREATE TABLE tenk2a PARTITION OF tenk2 FOR VALUES FROM (MINVALUE) TO (MAXVALUE);
+
 
 
 CREATE TABLE person (
diff --git a/src/test/regress/sql/select_parallel.sql b/src/test/regress/sql/select_parallel.sql
index 1bd2821..97ed7c0 100644
--- a/src/test/regress/sql/select_parallel.sql
+++ b/src/test/regress/sql/select_parallel.sql
@@ -20,7 +20,7 @@ explain (costs off)
 select count(*) from a_star;
 
 -- test that parallel_restricted function doesn't run in worker
-alter table tenk1 set (parallel_workers = 4);
+alter table tenk1a set (parallel_workers = 4);
 explain (verbose, costs off)
 select parallel_restricted(unique1) from tenk1
   where stringu1 = 'GRAAAA' order by 1;
@@ -46,7 +46,7 @@ execute tenk1_count(1);
 deallocate tenk1_count;
 
 -- test parallel plans for queries containing un-correlated subplans.
-alter table tenk2 set (parallel_workers = 0);
+alter table tenk2a set (parallel_workers = 0);
 explain (costs off)
 	select count(*) from tenk1 where (two, four) not in
 	(select hundred, thousand from tenk2 where thousand > 100);
diff --git a/src/test/regress/sql/stats.sql b/src/test/regress/sql/stats.sql
index 2be7dde..c45f96f 100644
--- a/src/test/regress/sql/stats.sql
+++ b/src/test/regress/sql/stats.sql
@@ -22,7 +22,7 @@ SELECT t.seq_scan, t.seq_tup_read, t.idx_scan, t.idx_tup_fetch,
        pg_stat_get_snapshot_timestamp() as snap_ts
   FROM pg_catalog.pg_stat_user_tables AS t,
        pg_catalog.pg_statio_user_tables AS b
- WHERE t.relname='tenk2' AND b.relname='tenk2';
+ WHERE t.relname='tenk2a' AND b.relname='tenk2a';
 
 -- function to wait for counters to advance
 create function wait_for_stats() returns void as $$
@@ -44,12 +44,12 @@ begin
     -- check to see if seqscan has been sensed
     SELECT (st.seq_scan >= pr.seq_scan + 1) INTO updated1
       FROM pg_stat_user_tables AS st, pg_class AS cl, prevstats AS pr
-     WHERE st.relname='tenk2' AND cl.relname='tenk2';
+     WHERE st.relname='tenk2a' AND cl.relname='tenk2a';
 
     -- check to see if indexscan has been sensed
     SELECT (st.idx_scan >= pr.idx_scan + 1) INTO updated2
       FROM pg_stat_user_tables AS st, pg_class AS cl, prevstats AS pr
-     WHERE st.relname='tenk2' AND cl.relname='tenk2';
+     WHERE st.relname='tenk2a' AND cl.relname='tenk2a';
 
     -- check to see if all updates have been sensed
     SELECT (n_tup_ins > 0) INTO updated3
@@ -164,12 +164,12 @@ SELECT st.seq_scan >= pr.seq_scan + 1,
        st.idx_scan >= pr.idx_scan + 1,
        st.idx_tup_fetch >= pr.idx_tup_fetch + 1
   FROM pg_stat_user_tables AS st, pg_class AS cl, prevstats AS pr
- WHERE st.relname='tenk2' AND cl.relname='tenk2';
+ WHERE st.relname='tenk2a' AND cl.relname='tenk2a';
 
 SELECT st.heap_blks_read + st.heap_blks_hit >= pr.heap_blks + cl.relpages,
        st.idx_blks_read + st.idx_blks_hit >= pr.idx_blks + 1
   FROM pg_statio_user_tables AS st, pg_class AS cl, prevstats AS pr
- WHERE st.relname='tenk2' AND cl.relname='tenk2';
+ WHERE st.relname='tenk2a' AND cl.relname='tenk2a';
 
 SELECT pr.snap_ts < pg_stat_get_snapshot_timestamp() as snapshot_newer
 FROM prevstats AS pr;
