This is an automated email from the ASF dual-hosted git repository.

chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/cbdb-postgres-merge by this 
push:
     new 8c696adc081 Fix some answer files for greenplum schedule in pax
8c696adc081 is described below

commit 8c696adc08166cc62dcf391ea9228d12ce950010
Author: Jinbao Chen <[email protected]>
AuthorDate: Tue Mar 24 00:58:24 2026 -0400

    Fix some answer files for greenplum schedule in pax
---
 .../src/test/regress/expected/bitmap_index.out     |  64 +++---
 .../src/test/regress/expected/case_gp.out          |  52 ++---
 .../test/regress/expected/create_table_like_gp.out |  20 +-
 .../src/test/regress/expected/decode_expr.out      |   8 +-
 .../src/test/regress/expected/filter.out           |   3 +-
 .../test/regress/expected/function_extensions.out  |  48 ++--
 .../src/test/regress/expected/gp_create_view.out   |   2 +-
 .../src/test/regress/expected/gpdist.out           |  16 +-
 .../src/test/regress/expected/notin.out            |  42 ++--
 .../src/test/regress/expected/opclass_ddl.out      |   4 +-
 .../src/test/regress/expected/percentile.out       |  24 +-
 .../test/regress/expected/replication_slots.out    |   6 +-
 .../src/test/regress/expected/test_setup.out       | 245 +++++++++++++++++++++
 .../src/test/regress/expected/update_gp.out        |   2 +-
 .../test/regress/expected/variadic_parameters.out  |  20 +-
 .../src/test/regress/expected/window_views.out     |  90 ++++----
 .../src/test/regress/output/gpcopy.source          |   1 +
 .../src/test/regress/output/table_functions.source |  24 +-
 .../src/test/regress/sql/gp_aggregates.sql         |   4 +-
 19 files changed, 455 insertions(+), 220 deletions(-)

diff --git a/contrib/pax_storage/src/test/regress/expected/bitmap_index.out 
b/contrib/pax_storage/src/test/regress/expected/bitmap_index.out
index d94d2354703..821ab02f3f4 100644
--- a/contrib/pax_storage/src/test/regress/expected/bitmap_index.out
+++ b/contrib/pax_storage/src/test/regress/expected/bitmap_index.out
@@ -810,22 +810,23 @@ CREATE INDEX ON test_bmselec USING bitmap(type);
 ANALYZE test_bmselec;
 -- it used to choose bitmap index over seq scan, which not right.
 explain (analyze, verbose) select * from test_bmselec where type < 500;
-                                                          QUERY PLAN           
                                                
--------------------------------------------------------------------------------------------------------------------------------
- Gather Motion 3:1  (slice1; segments: 3)  (cost=0.00..562.63 rows=5097 
width=41) (actual time=0.325..5.944 rows=5000 loops=1)
+                                                               QUERY PLAN      
                                                          
+-----------------------------------------------------------------------------------------------------------------------------------------
+ Gather Motion 3:1  (slice1; segments: 3)  (cost=4.41..120.23 rows=4847 
width=41) (actual time=59.244..254.935 rows=5000 loops=1)
    Output: id, type, msg
-   ->  Seq Scan on public.test_bmselec  (cost=0.00..494.67 rows=1699 width=41) 
(actual time=0.029..5.094 rows=1693 loops=1)
+   ->  Bitmap Heap Scan on public.test_bmselec  (cost=4.41..55.61 rows=1616 
width=41) (actual time=37.970..253.251 rows=1693 loops=1)
          Output: id, type, msg
-         Filter: (test_bmselec.type < 500)
-         Rows Removed by Filter: 31769
- Planning Time: 0.620 ms
-   (slice0)    Executor memory: 36K bytes.
-   (slice1)    Executor memory: 36K bytes avg x 3 workers, 36K bytes max 
(seg0).
+         Recheck Cond: (test_bmselec.type < 500)
+         ->  Bitmap Index Scan on test_bmselec_type_idx  (cost=0.00..4.01 
rows=1616 width=0) (actual time=23.929..23.929 rows=1 loops=1)
+               Index Cond: (test_bmselec.type < 500)
+ Settings: enable_seqscan = 'on', enable_indexscan = 'on', enable_bitmapscan = 
'on'
+ Planning Time: 0.896 ms
+   (slice0)    Executor memory: 118K bytes.
+   (slice1)    Executor memory: 63274K bytes avg x 3x(0) workers, 63485K bytes 
max (seg0).
  Memory used:  128000kB
  Optimizer: Postgres query optimizer
- Settings: enable_bitmapscan=on, enable_indexscan=on, enable_seqscan=on
- Execution Time: 6.606 ms
-(13 rows)
+ Execution Time: 259.149 ms
+(14 rows)
 
 SET enable_seqscan = OFF;
 SET enable_bitmapscan = OFF;
@@ -863,18 +864,19 @@ explain (analyze, verbose) select * from test_bmsparse 
where type < 200;
 
-----------------------------------------------------------------------------------------------------------------------------------
  Gather Motion 3:1  (slice1; segments: 3)  (cost=0.00..1559.93 rows=79895 
width=41) (actual time=0.846..27.219 rows=80400 loops=1)
    Output: id, type, msg
-   ->  Seq Scan on public.test_bmsparse  (cost=0.00..494.67 rows=26632 
width=41) (actual time=0.029..7.373 rows=26975 loops=1)
+   ->  Bitmap Heap Scan on public.test_bmsparse  (cost=10.66..374.52 
rows=26628 width=41) (actual time=13.480..3166.839 rows=26975 loops=1)
          Output: id, type, msg
-         Filter: (test_bmsparse.type < 200)
-         Rows Removed by Filter: 6596
- Planning Time: 0.549 ms
-   (slice0)    Executor memory: 36K bytes.
-   (slice1)    Executor memory: 36K bytes avg x 3 workers, 36K bytes max 
(seg0).
+         Recheck Cond: (test_bmsparse.type < 200)
+         ->  Bitmap Index Scan on test_bmsparse_type_idx  (cost=0.00..4.01 
rows=26628 width=0) (actual time=9.625..9.626 rows=1 loops=1)
+               Index Cond: (test_bmsparse.type < 200)
+ Settings: enable_seqscan = 'on', enable_indexscan = 'on', enable_bitmapscan = 
'on'
+ Planning Time: 0.396 ms
+   (slice0)    Executor memory: 118K bytes.
+   (slice1)    Executor memory: 26344K bytes avg x 3x(0) workers, 26344K bytes 
max (seg0).
  Memory used:  128000kB
  Optimizer: Postgres query optimizer
- Settings: enable_bitmapscan=on, enable_indexscan=on, enable_seqscan=on
- Execution Time: 31.714 ms
-(13 rows)
+ Execution Time: 3185.452 ms
+(14 rows)
 
 SET enable_seqscan = OFF;
 SET enable_bitmapscan = OFF;
@@ -899,17 +901,19 @@ SET enable_seqscan = ON;
 SET enable_bitmapscan = ON;
 -- select small part of table but on lots of distinct values, should use seq 
scan
 explain (analyze, verbose) select * from test_bmsparse where type > 500;
-                                                           QUERY PLAN          
                                                  
----------------------------------------------------------------------------------------------------------------------------------
- Gather Motion 3:1  (slice1; segments: 3)  (cost=0.00..748.40 rows=19030 
width=41) (actual time=0.327..9.309 rows=18998 loops=1)
+                                                                 QUERY PLAN    
                                                             
+--------------------------------------------------------------------------------------------------------------------------------------------
+ Gather Motion 3:1  (slice1; segments: 3)  (cost=5.60..370.74 rows=19094 
width=41) (actual time=389.579..1322.270 rows=18998 loops=1)
    Output: id, type, msg
-   ->  Seq Scan on public.test_bmsparse  (cost=0.00..494.67 rows=6343 
width=41) (actual time=0.042..5.347 rows=6448 loops=1)
+   ->  Bitmap Heap Scan on public.test_bmsparse  (cost=5.60..116.16 rows=6365 
width=41) (actual time=389.737..1318.694 rows=6448 loops=1)
          Output: id, type, msg
-         Filter: (test_bmsparse.type > 500)
-         Rows Removed by Filter: 26979
- Planning Time: 0.330 ms
-   (slice0)    Executor memory: 36K bytes.
-   (slice1)    Executor memory: 36K bytes avg x 3 workers, 36K bytes max 
(seg0).
+         Recheck Cond: (test_bmsparse.type > 500)
+         ->  Bitmap Index Scan on test_bmsparse_type_idx  (cost=0.00..4.01 
rows=6365 width=0) (actual time=316.931..316.932 rows=1 loops=1)
+               Index Cond: (test_bmsparse.type > 500)
+ Settings: enable_seqscan = 'on', enable_indexscan = 'on', enable_bitmapscan = 
'on'
+ Planning Time: 0.436 ms
+   (slice0)    Executor memory: 118K bytes.
+   (slice1)    Executor memory: 401201K bytes avg x 3x(0) workers, 408489K 
bytes max (seg1).
  Memory used:  128000kB
  Optimizer: Postgres query optimizer
  Settings: enable_bitmapscan=on, enable_indexscan=on, enable_seqscan=on
diff --git a/contrib/pax_storage/src/test/regress/expected/case_gp.out 
b/contrib/pax_storage/src/test/regress/expected/case_gp.out
index 153669cf994..21218b2b524 100644
--- a/contrib/pax_storage/src/test/regress/expected/case_gp.out
+++ b/contrib/pax_storage/src/test/regress/expected/case_gp.out
@@ -45,13 +45,13 @@ SELECT
         END AS t
     FROM mytable;
 select pg_get_viewdef('notdisview2',true);
-                                pg_get_viewdef                                 
--------------------------------------------------------------------------------
-  SELECT                                                                      +
-         CASE                                                                 +
-             WHEN mytable.c::text IS NOT DISTINCT FROM ''::text THEN 'A'::text+
-             ELSE 'B'::text                                                   +
-         END AS t                                                             +
+                            pg_get_viewdef                             
+-----------------------------------------------------------------------
+  SELECT                                                              +
+         CASE                                                         +
+             WHEN c::text IS NOT DISTINCT FROM ''::text THEN 'A'::text+
+             ELSE 'B'::text                                           +
+         END AS t                                                     +
     FROM mytable;
 (1 row)
 
@@ -72,9 +72,9 @@ select pg_get_viewdef('notdisview3',false);
                                pg_get_viewdef                                
 -----------------------------------------------------------------------------
   SELECT                                                                    +
-         CASE mytable2.key_value                                            +
+         CASE key_value                                                     +
              WHEN IS NOT DISTINCT FROM 'NULL'::text THEN ('now'::text)::date+
-             ELSE to_date((mytable2.key_value)::text, 'YYYYMM'::text)       +
+             ELSE to_date((key_value)::text, 'YYYYMM'::text)                +
          END AS t                                                           +
     FROM mytable2;
 (1 row)
@@ -111,18 +111,18 @@ SELECT * FROM myview ORDER BY a,b;
 
 -- Test deparse
 select pg_get_viewdef('myview',true); 
-                                   pg_get_viewdef                              
      
--------------------------------------------------------------------------------------
-  SELECT mytable.a,                                                            
     +
-     mytable.b,                                                                
     +
-         CASE mytable.a                                                        
     +
-             WHEN IS NOT DISTINCT FROM mytable.b THEN (mytable.b * 
10)::numeric     +
-             WHEN IS NOT DISTINCT FROM mytable.b + 1 THEN (mytable.b * 
100)::numeric+
-             WHEN mytable.b - 1 THEN (mytable.b * 1000)::numeric               
     +
-             WHEN mytable.b * 10 THEN (mytable.b * 10000)::numeric             
     +
-             WHEN negate(mytable.b) THEN mytable.b::numeric * '-1.0'::numeric  
     +
-             ELSE mytable.b::numeric                                           
     +
-         END AS newb                                                           
     +
+                           pg_get_viewdef                            
+---------------------------------------------------------------------
+  SELECT a,                                                         +
+     b,                                                             +
+         CASE a                                                     +
+             WHEN IS NOT DISTINCT FROM b THEN (b * 10)::numeric     +
+             WHEN IS NOT DISTINCT FROM b + 1 THEN (b * 100)::numeric+
+             WHEN b - 1 THEN (b * 1000)::numeric                    +
+             WHEN b * 10 THEN (b * 10000)::numeric                  +
+             WHEN negate(b) THEN b::numeric * '-1.0'::numeric       +
+             ELSE b::numeric                                        +
+         END AS newb                                                +
     FROM mytable;
 (1 row)
 
@@ -296,10 +296,10 @@ SELECT * FROM myview ORDER BY id, location;
 select pg_get_viewdef('myview',true); 
                            pg_get_viewdef                           
 --------------------------------------------------------------------
-  SELECT products.id,                                              +
-     products.name,                                                +
-     products.price,                                               +
-         CASE products.id                                          +
+  SELECT id,                                                       +
+     name,                                                         +
+     price,                                                        +
+         CASE id                                                   +
              WHEN IS NOT DISTINCT FROM 1 THEN 'Southlake'::text    +
              WHEN IS NOT DISTINCT FROM 2 THEN 'San Francisco'::text+
              WHEN IS NOT DISTINCT FROM 3 THEN 'New Jersey'::text   +
@@ -310,7 +310,7 @@ select pg_get_viewdef('myview',true);
              ELSE 'Non domestic'::text                             +
          END AS location                                           +
     FROM products                                                  +
-   WHERE products.id < 100;
+   WHERE id < 100;
 (1 row)
 
 -- User-defined DECODE function
diff --git 
a/contrib/pax_storage/src/test/regress/expected/create_table_like_gp.out 
b/contrib/pax_storage/src/test/regress/expected/create_table_like_gp.out
index e70cf20d19d..cb8a77af122 100644
--- a/contrib/pax_storage/src/test/regress/expected/create_table_like_gp.out
+++ b/contrib/pax_storage/src/test/regress/expected/create_table_like_gp.out
@@ -34,11 +34,11 @@ WHERE
 ------------+-----------+-------------+--------------+---------------
  t_ao       | ao_column | t           |              |             0
  t_ao_enc   | ao_column | t           |              |             0
- t_ao_a     | ao_column | t           |              |             0
- t_ao_b     | ao_column | t           |              |             0
+ t_ao_a     | pax       |             |              |              
+ t_ao_b     | pax       |             |              |              
  t_ao_c     | pax       |             |              |              
- t_ao_enc_a | ao_column | t           |              |             0
- t_ao_d     | ao_column | t           |              |             0
+ t_ao_enc_a | pax       |             |              |              
+ t_ao_d     | ao_row    | f           |              |             0
 (7 rows)
 
 SELECT
@@ -50,13 +50,11 @@ FROM
                JOIN pg_catalog.pg_attribute_encoding a ON (a.attrelid = c.oid)
 WHERE
        c.relname like 't_ao_enc%';
-  relname   | attnum |                     attoptions                      
-------------+--------+-----------------------------------------------------
- t_ao_enc   |      2 | {compresstype=zlib,compresslevel=1,blocksize=32768}
- t_ao_enc   |      1 | {compresstype=none,compresslevel=0,blocksize=32768}
- t_ao_enc_a |      2 | {compresstype=zlib,compresslevel=1,blocksize=32768}
- t_ao_enc_a |      1 | {compresstype=none,compresslevel=0,blocksize=32768}
-(4 rows)
+ relname  | attnum |                     attoptions                      
+----------+--------+-----------------------------------------------------
+ t_ao_enc |      2 | {compresstype=zlib,compresslevel=1,blocksize=32768}
+ t_ao_enc |      1 | {compresstype=none,compresslevel=0,blocksize=32768}
+(2 rows)
 
 -- EXTERNAL TABLE
 CREATE EXTERNAL TABLE t_ext (a integer) LOCATION ('file://127.0.0.1/tmp/foo') 
FORMAT 'text';
diff --git a/contrib/pax_storage/src/test/regress/expected/decode_expr.out 
b/contrib/pax_storage/src/test/regress/expected/decode_expr.out
index 2a636b82588..4b397464d39 100644
--- a/contrib/pax_storage/src/test/regress/expected/decode_expr.out
+++ b/contrib/pax_storage/src/test/regress/expected/decode_expr.out
@@ -1048,9 +1048,9 @@ order by locid, country_code;
  country_code | character(2) |           |          |         | extended | 
  region       | text         |           |          |         | extended | 
 View definition:
- SELECT locations.bus_name,
-    locations.country_code,
-        CASE locations.country_code
+ SELECT bus_name,
+    country_code,
+        CASE country_code
             WHEN IS NOT DISTINCT FROM 'US'::bpchar THEN 'Americas'::text
             WHEN IS NOT DISTINCT FROM 'CA'::bpchar THEN 'Americas'::text
             WHEN IS NOT DISTINCT FROM 'MX'::bpchar THEN 'Americas'::text
@@ -1065,7 +1065,7 @@ View definition:
             ELSE NULL::text
         END AS region
    FROM locations
-  ORDER BY locations.locid, locations.country_code;
+  ORDER BY locid, country_code;
 
 select * from decode_view order by region, country_code;
       bus_name       | country_code |  region  
diff --git a/contrib/pax_storage/src/test/regress/expected/filter.out 
b/contrib/pax_storage/src/test/regress/expected/filter.out
index 134b71c042e..edb4a71115b 100644
--- a/contrib/pax_storage/src/test/regress/expected/filter.out
+++ b/contrib/pax_storage/src/test/regress/expected/filter.out
@@ -561,7 +561,8 @@ select * from (select i from filter_test where j = 1) x1,
 ERROR:  invalid reference to FROM-clause entry for table "x1"
 LINE 2:               (select sum(i) filter (where i < x1.i) from fi...
                                                        ^
-HINT:  There is an entry for table "x1", but it cannot be referenced from this 
part of the query.
+DETAIL:  There is an entry for table "x1", but it cannot be referenced from 
this part of the query.
+HINT:  To reference that table, you must mark this subquery with LATERAL.
 -- TEST against user defined aggregation function
 create or replace function _maxodd(oldmax int, newval int) returns int as $$
   SELECT CASE WHEN $1 is NULL 
diff --git 
a/contrib/pax_storage/src/test/regress/expected/function_extensions.out 
b/contrib/pax_storage/src/test/regress/expected/function_extensions.out
index bf7d6501371..72005690a58 100644
--- a/contrib/pax_storage/src/test/regress/expected/function_extensions.out
+++ b/contrib/pax_storage/src/test/regress/expected/function_extensions.out
@@ -387,50 +387,34 @@ explain select * from srf_testtab, test_srf() where 
test_srf = srf_testtab.t;
 
 -- Test ALTER FUNCTION, and that \df displays the EXECUTE ON correctly
 \df+ test_srf
-                                                                               
                  List of functions
- Schema |   Name   | Result data type | Argument data types | Type | Data 
access | Execute on | Volatility | Parallel |    Owner    | Security | Access 
privileges | Language |     Source code      | Description 
---------+----------+------------------+---------------------+------+-------------+------------+------------+----------+-------------+----------+-------------------+----------+----------------------+-------------
- public | test_srf | SETOF text       |                     | func | no sql    
  | any        | immutable  | unsafe   | srftestuser | invoker  |               
    | plpgsql  |                     +| 
-        |          |                  |                     |      |           
  |            |            |          |             |          |               
    |          | begin               +| 
-        |          |                  |                     |      |           
  |            |            |          |             |          |               
    |          |   return next 'foo';+| 
-        |          |                  |                     |      |           
  |            |            |          |             |          |               
    |          | end;                +| 
-        |          |                  |                     |      |           
  |            |            |          |             |          |               
    |          |                      | 
+                                                                               
              List of functions
+ Schema |   Name   | Result data type | Argument data types | Type | Data 
access | Execute on | Volatility | Parallel |    Owner    | Security | Access 
privileges | Language | Internal name | Description 
+--------+----------+------------------+---------------------+------+-------------+------------+------------+----------+-------------+----------+-------------------+----------+---------------+-------------
+ public | test_srf | SETOF text       |                     | func | no sql    
  | any        | immutable  | unsafe   | srftestuser | invoker  |               
    | plpgsql  |               | 
 (1 row)
 
 alter function test_srf() EXECUTE ON COORDINATOR;
 \df+ test_srf
-                                                                               
                  List of functions
- Schema |   Name   | Result data type | Argument data types | Type | Data 
access | Execute on  | Volatility | Parallel |    Owner    | Security | Access 
privileges | Language |     Source code      | Description 
---------+----------+------------------+---------------------+------+-------------+-------------+------------+----------+-------------+----------+-------------------+----------+----------------------+-------------
- public | test_srf | SETOF text       |                     | func | no sql    
  | coordinator | immutable  | unsafe   | srftestuser | invoker  |              
     | plpgsql  |                     +| 
-        |          |                  |                     |      |           
  |             |            |          |             |          |              
     |          | begin               +| 
-        |          |                  |                     |      |           
  |             |            |          |             |          |              
     |          |   return next 'foo';+| 
-        |          |                  |                     |      |           
  |             |            |          |             |          |              
     |          | end;                +| 
-        |          |                  |                     |      |           
  |             |            |          |             |          |              
     |          |                      | 
+                                                                               
               List of functions
+ Schema |   Name   | Result data type | Argument data types | Type | Data 
access | Execute on  | Volatility | Parallel |    Owner    | Security | Access 
privileges | Language | Internal name | Description 
+--------+----------+------------------+---------------------+------+-------------+-------------+------------+----------+-------------+----------+-------------------+----------+---------------+-------------
+ public | test_srf | SETOF text       |                     | func | no sql    
  | coordinator | immutable  | unsafe   | srftestuser | invoker  |              
     | plpgsql  |               | 
 (1 row)
 
 alter function test_srf() EXECUTE ON ALL SEGMENTS;
 \df+ test_srf
-                                                                               
                   List of functions
- Schema |   Name   | Result data type | Argument data types | Type | Data 
access |  Execute on  | Volatility | Parallel |    Owner    | Security | Access 
privileges | Language |     Source code      | Description 
---------+----------+------------------+---------------------+------+-------------+--------------+------------+----------+-------------+----------+-------------------+----------+----------------------+-------------
- public | test_srf | SETOF text       |                     | func | no sql    
  | all segments | immutable  | unsafe   | srftestuser | invoker  |             
      | plpgsql  |                     +| 
-        |          |                  |                     |      |           
  |              |            |          |             |          |             
      |          | begin               +| 
-        |          |                  |                     |      |           
  |              |            |          |             |          |             
      |          |   return next 'foo';+| 
-        |          |                  |                     |      |           
  |              |            |          |             |          |             
      |          | end;                +| 
-        |          |                  |                     |      |           
  |              |            |          |             |          |             
      |          |                      | 
+                                                                               
               List of functions
+ Schema |   Name   | Result data type | Argument data types | Type | Data 
access |  Execute on  | Volatility | Parallel |    Owner    | Security | Access 
privileges | Language | Internal name | Description 
+--------+----------+------------------+---------------------+------+-------------+--------------+------------+----------+-------------+----------+-------------------+----------+---------------+-------------
+ public | test_srf | SETOF text       |                     | func | no sql    
  | all segments | immutable  | unsafe   | srftestuser | invoker  |             
      | plpgsql  |               | 
 (1 row)
 
 alter function test_srf() EXECUTE ON ANY;
 \df+ test_srf
-                                                                               
                  List of functions
- Schema |   Name   | Result data type | Argument data types | Type | Data 
access | Execute on | Volatility | Parallel |    Owner    | Security | Access 
privileges | Language |     Source code      | Description 
---------+----------+------------------+---------------------+------+-------------+------------+------------+----------+-------------+----------+-------------------+----------+----------------------+-------------
- public | test_srf | SETOF text       |                     | func | no sql    
  | any        | immutable  | unsafe   | srftestuser | invoker  |               
    | plpgsql  |                     +| 
-        |          |                  |                     |      |           
  |            |            |          |             |          |               
    |          | begin               +| 
-        |          |                  |                     |      |           
  |            |            |          |             |          |               
    |          |   return next 'foo';+| 
-        |          |                  |                     |      |           
  |            |            |          |             |          |               
    |          | end;                +| 
-        |          |                  |                     |      |           
  |            |            |          |             |          |               
    |          |                      | 
+                                                                               
              List of functions
+ Schema |   Name   | Result data type | Argument data types | Type | Data 
access | Execute on | Volatility | Parallel |    Owner    | Security | Access 
privileges | Language | Internal name | Description 
+--------+----------+------------------+---------------------+------+-------------+------------+------------+----------+-------------+----------+-------------------+----------+---------------+-------------
+ public | test_srf | SETOF text       |                     | func | no sql    
  | any        | immutable  | unsafe   | srftestuser | invoker  |               
    | plpgsql  |               | 
 (1 row)
 
 DROP FUNCTION test_srf();
diff --git a/contrib/pax_storage/src/test/regress/expected/gp_create_view.out 
b/contrib/pax_storage/src/test/regress/expected/gp_create_view.out
index 2e02be97bd5..c862e60abc3 100644
--- a/contrib/pax_storage/src/test/regress/expected/gp_create_view.out
+++ b/contrib/pax_storage/src/test/regress/expected/gp_create_view.out
@@ -119,7 +119,7 @@ CREATE TEMP VIEW view_with_gp_dist_random_special_chars AS 
SELECT * FROM gp_dist
 SELECT pg_get_viewdef('view_with_gp_dist_random_special_chars');
                                pg_get_viewdef                               
 ----------------------------------------------------------------------------
-  SELECT "foo\'.bar".a                                                     +
+  SELECT a                                                                 +
     FROM gp_dist_random(E'"schema_view\\''.gp_dist_random"."foo\\''.bar"');
 (1 row)
 
diff --git a/contrib/pax_storage/src/test/regress/expected/gpdist.out 
b/contrib/pax_storage/src/test/regress/expected/gpdist.out
index dbe017b1f59..af61cc7b863 100644
--- a/contrib/pax_storage/src/test/regress/expected/gpdist.out
+++ b/contrib/pax_storage/src/test/regress/expected/gpdist.out
@@ -669,16 +669,18 @@ create temporary table a as select generate_series(1, 5) 
as i distributed by (i)
 create temporary table b as select generate_series(2, 6) as i distributed by 
(i);
 create temporary table c as select generate_series(3, 7) as i distributed by 
(i);
 explain (costs off) select * from a full join b on (a.i=b.i) full join c on 
(b.i=c.i);
-                QUERY PLAN                
-------------------------------------------
+                         QUERY PLAN                         
+------------------------------------------------------------
  Gather Motion 3:1  (slice1; segments: 3)
    ->  Hash Full Join
          Hash Cond: (b.i = c.i)
-         ->  Hash Full Join
-               Hash Cond: (a.i = b.i)
-               ->  Seq Scan on a
-               ->  Hash
-                     ->  Seq Scan on b
+         ->  Redistribute Motion 3:3  (slice2; segments: 3)
+               Hash Key: b.i
+               ->  Hash Full Join
+                     Hash Cond: (a.i = b.i)
+                     ->  Seq Scan on a
+                     ->  Hash
+                           ->  Seq Scan on b
          ->  Hash
                ->  Seq Scan on c
  Optimizer: Postgres query optimizer
diff --git a/contrib/pax_storage/src/test/regress/expected/notin.out 
b/contrib/pax_storage/src/test/regress/expected/notin.out
index 6d70d874594..a62a50618c4 100644
--- a/contrib/pax_storage/src/test/regress/expected/notin.out
+++ b/contrib/pax_storage/src/test/regress/expected/notin.out
@@ -1247,18 +1247,18 @@ select * from table_source3 where c3 = 'INC' and c4 = 
'0000000001' and c2 not in
 (0 rows)
 
 explain select * from table_source4 where c3 = 'INC' and c4 = '0000000001' and 
c2 not in (SELECT c1 from table_config where c2='test');
-                                           QUERY PLAN                          
                 
-------------------------------------------------------------------------------------------------
- Gather Motion 3:1  (slice1; segments: 3)  (cost=9.33..10.54 rows=10 width=42)
-   ->  Hash Left Anti Semi (Not-In) Join  (cost=9.33..10.41 rows=3 width=42)
-         Hash Cond: ((table_source4.c2)::text = (table_config.c1)::text)
-         ->  Redistribute Motion 3:3  (slice2; segments: 3)  (cost=0.00..1.03 
rows=1 width=42)
-               Hash Key: table_source4.c2
-               ->  Seq Scan on table_source4  (cost=0.00..1.01 rows=1 width=42)
-                     Filter: (((c3)::text = 'INC'::text) AND ((c4)::text = 
'0000000001'::text))
-         ->  Hash  (cost=5.17..5.17 rows=333 width=3)
-               ->  Seq Scan on table_config  (cost=0.00..5.17 rows=333 width=3)
-                     Filter: ((c2)::text = 'test'::text)
+                                              QUERY PLAN                       
                        
+-------------------------------------------------------------------------------------------------------
+ Gather Motion 3:1  (slice1; segments: 3)  (cost=52.03..58.20 rows=10 
width=872)
+   ->  Hash Right Anti Join  (cost=52.03..58.07 rows=3 width=872)
+         Hash Cond: ((table_config.c1)::text = (table_source4.c2)::text)
+         ->  Seq Scan on table_config  (cost=0.00..5.17 rows=333 width=3)
+               Filter: ((c2)::text = 'test'::text)
+         ->  Hash  (cost=52.02..52.02 rows=1 width=872)
+               ->  Redistribute Motion 3:3  (slice2; segments: 3)  
(cost=0.00..52.02 rows=1 width=872)
+                     Hash Key: table_source4.c2
+                     ->  Seq Scan on table_source4  (cost=0.00..52.00 rows=1 
width=872)
+                           Filter: (((c3)::text = 'INC'::text) AND ((c4)::text 
= '0000000001'::text))
  Optimizer: Postgres query optimizer
 (11 rows)
 
@@ -1415,15 +1415,15 @@ select * from t1_12930 where (a, b) not in (select a, b 
from t2_12930);
 (0 rows)
 
 explain select * from t1_12930 where (a, b) not in (select a, b from t2_12930) 
and b is not null;
-                                     QUERY PLAN                                
     
-------------------------------------------------------------------------------------
- Gather Motion 3:1  (slice1; segments: 3)  (cost=751.50..206932.71 rows=16 
width=8)
-   ->  Hash Left Anti Semi (Not-In) Join  (cost=751.50..206932.49 rows=5 
width=8)
-         Hash Cond: ((t1_12930.a = t2_12930.a) AND (t1_12930.b = t2_12930.b))
-         ->  Seq Scan on t1_12930  (cost=0.00..321.00 rows=28671 width=8)
-               Filter: (b IS NOT NULL)
-         ->  Hash  (cost=321.00..321.00 rows=28700 width=8)
-               ->  Seq Scan on t2_12930  (cost=0.00..321.00 rows=28700 width=8)
+                                      QUERY PLAN                               
        
+---------------------------------------------------------------------------------------
+ Gather Motion 3:1  (slice1; segments: 3)  (cost=751.07..208007.32 rows=64510 
width=8)
+   ->  Hash Right Anti Join  (cost=751.07..207147.18 rows=21503 width=8)
+         Hash Cond: ((t2_12930.a = t1_12930.a) AND (t2_12930.b = t1_12930.b))
+         ->  Seq Scan on t2_12930  (cost=0.00..321.00 rows=28700 width=8)
+         ->  Hash  (cost=321.00..321.00 rows=28671 width=8)
+               ->  Seq Scan on t1_12930  (cost=0.00..321.00 rows=28671 width=8)
+                     Filter: (b IS NOT NULL)
  Optimizer: Postgres query optimizer
 (8 rows)
 
diff --git a/contrib/pax_storage/src/test/regress/expected/opclass_ddl.out 
b/contrib/pax_storage/src/test/regress/expected/opclass_ddl.out
index 6de89fe4ee3..5a18c3e80f3 100644
--- a/contrib/pax_storage/src/test/regress/expected/opclass_ddl.out
+++ b/contrib/pax_storage/src/test/regress/expected/opclass_ddl.out
@@ -41,13 +41,13 @@ ALTER OPERATOR FAMILY alt_opf1 USING hash RENAME TO 
alt_opf2;  -- failed (name c
 ERROR:  operator family "alt_opf2" for access method "hash" already exists in 
schema "alt_nsp1"
 ALTER OPERATOR FAMILY alt_opf1 USING hash RENAME TO alt_opf3;  -- OK
 ALTER OPERATOR FAMILY alt_opf2 USING hash OWNER TO regtest_alter_user2;  -- 
failed (no role membership)
-ERROR:  must be member of role "regtest_alter_user2"
+ERROR:  must be able to SET ROLE "regtest_alter_user2"
 ALTER OPERATOR FAMILY alt_opf2 USING hash OWNER TO regtest_alter_user3;  -- OK
 ALTER OPERATOR CLASS alt_opc1 USING hash RENAME TO alt_opc2;  -- failed (name 
conflict)
 ERROR:  operator class "alt_opc2" for access method "hash" already exists in 
schema "alt_nsp1"
 ALTER OPERATOR CLASS alt_opc1 USING hash RENAME TO alt_opc3;  -- OK
 ALTER OPERATOR CLASS alt_opc2 USING hash OWNER TO regtest_alter_user2;  -- 
failed (no role membership)
-ERROR:  must be member of role "regtest_alter_user2"
+ERROR:  must be able to SET ROLE "regtest_alter_user2"
 ALTER OPERATOR CLASS alt_opc2 USING hash OWNER TO regtest_alter_user3;  -- OK
 RESET SESSION AUTHORIZATION;
 -- Test adding operators to an existing opfamily as that requires oid
diff --git a/contrib/pax_storage/src/test/regress/expected/percentile.out 
b/contrib/pax_storage/src/test/regress/expected/percentile.out
index 981507d01a3..3efc06a19df 100644
--- a/contrib/pax_storage/src/test/regress/expected/percentile.out
+++ b/contrib/pax_storage/src/test/regress/expected/percentile.out
@@ -513,21 +513,21 @@ select * from percv;
 (11 rows)
 
 select pg_get_viewdef('percv');
-                                                          pg_get_viewdef       
                                                    
------------------------------------------------------------------------------------------------------------------------------------
-  SELECT percentile_cont((0.4)::double precision) WITHIN GROUP (ORDER BY 
(((perct.a / 10))::double precision)) AS percentile_cont,+
-     MEDIAN(perct.a) AS "median",                                              
                                                   +
-     percentile_disc((0.51)::double precision) WITHIN GROUP (ORDER BY perct.a 
DESC) AS percentile_disc                            +
-    FROM perct                                                                 
                                                   +
-   GROUP BY perct.b                                                            
                                                   +
-   ORDER BY perct.b;
+                                                       pg_get_viewdef          
                                              
+-----------------------------------------------------------------------------------------------------------------------------
+  SELECT percentile_cont((0.4)::double precision) WITHIN GROUP (ORDER BY (((a 
/ 10))::double precision)) AS percentile_cont,+
+     MEDIAN(a) AS "median",                                                    
                                             +
+     percentile_disc((0.51)::double precision) WITHIN GROUP (ORDER BY a DESC) 
AS percentile_disc                            +
+    FROM perct                                                                 
                                             +
+   GROUP BY b                                                                  
                                             +
+   ORDER BY b;
 (1 row)
 
 select pg_get_viewdef('percv2');
-                pg_get_viewdef                 
------------------------------------------------
-  SELECT MEDIAN(perct.a) AS m1,               +
-     MEDIAN((perct.a)::double precision) AS m2+
+             pg_get_viewdef              
+-----------------------------------------
+  SELECT MEDIAN(a) AS m1,               +
+     MEDIAN((a)::double precision) AS m2+
     FROM perct;
 (1 row)
 
diff --git 
a/contrib/pax_storage/src/test/regress/expected/replication_slots.out 
b/contrib/pax_storage/src/test/regress/expected/replication_slots.out
index 3fdec9b5c10..bc5de687bc6 100644
--- a/contrib/pax_storage/src/test/regress/expected/replication_slots.out
+++ b/contrib/pax_storage/src/test/regress/expected/replication_slots.out
@@ -11,9 +11,9 @@ HINT:  Creating replication slots on a single segment is not 
advised.  Replicati
 
 -- And I should see that my replication slot exists
 select pg_get_replication_slots();
-            pg_get_replication_slots             
--------------------------------------------------
- (some_replication_slot,,physical,,f,f,,,,,,,,f)
+             pg_get_replication_slots             
+--------------------------------------------------
+ (some_replication_slot,,physical,,f,f,,,,,,,,f,)
 (1 row)
 
 -- Cleanup:
diff --git a/contrib/pax_storage/src/test/regress/expected/test_setup.out 
b/contrib/pax_storage/src/test/regress/expected/test_setup.out
new file mode 100644
index 00000000000..5d9e6bf12bc
--- /dev/null
+++ b/contrib/pax_storage/src/test/regress/expected/test_setup.out
@@ -0,0 +1,245 @@
+--
+-- TEST_SETUP --- prepare environment expected by regression test scripts
+--
+-- directory paths and dlsuffix are passed to us in environment variables
+\getenv abs_srcdir PG_ABS_SRCDIR
+\getenv libdir PG_LIBDIR
+\getenv dlsuffix PG_DLSUFFIX
+\set regresslib :libdir '/regress' :dlsuffix
+--
+-- synchronous_commit=off delays when hint bits may be set. Some plans change
+-- depending on the number of all-visible pages, which in turn can be
+-- influenced by the delayed hint bits. Force synchronous_commit=on to avoid
+-- that source of variability.
+--
+SET synchronous_commit = on;
+--
+-- Postgres formerly made the public schema read/write by default,
+-- and most of the core regression tests still expect that.
+--
+GRANT ALL ON SCHEMA public TO public;
+-- Create a tablespace we can use in tests.
+SET allow_in_place_tablespaces = true;
+CREATE TABLESPACE regress_tblspace LOCATION '';
+--
+-- These tables have traditionally been referenced by many tests,
+-- so create and populate them.  Insert only non-error values here.
+-- (Some subsequent tests try to insert erroneous values.  That's okay
+-- because the table won't actually change.  Do not change the contents
+-- of these tables in later tests, as it may affect other tests.)
+--
+CREATE TABLE CHAR_TBL(f1 char(4));
+INSERT INTO CHAR_TBL (f1) VALUES
+  ('a'),
+  ('ab'),
+  ('abcd'),
+  ('abcd    ');
+VACUUM CHAR_TBL;
+CREATE TABLE FLOAT8_TBL(f1 float8);
+INSERT INTO FLOAT8_TBL(f1) VALUES
+  ('0.0'),
+  ('-34.84'),
+  ('-1004.30'),
+  ('-1.2345678901234e+200'),
+  ('-1.2345678901234e-200');
+VACUUM FLOAT8_TBL;
+CREATE TABLE INT2_TBL(f1 int2);
+INSERT INTO INT2_TBL(f1) VALUES
+  ('0   '),
+  ('  1234 '),
+  ('    -1234'),
+  ('32767'),  -- largest and smallest values
+  ('-32767');
+VACUUM INT2_TBL;
+CREATE TABLE INT4_TBL(f1 int4);
+INSERT INTO INT4_TBL(f1) VALUES
+  ('   0  '),
+  ('123456     '),
+  ('    -123456'),
+  ('2147483647'),  -- largest and smallest values
+  ('-2147483647');
+VACUUM INT4_TBL;
+CREATE TABLE INT8_TBL(q1 int8, q2 int8);
+INSERT INTO INT8_TBL VALUES
+  ('  123   ','  456'),
+  ('123   ','4567890123456789'),
+  ('4567890123456789','123'),
+  (+4567890123456789,'4567890123456789'),
+  ('+4567890123456789','-4567890123456789');
+VACUUM INT8_TBL;
+CREATE TABLE POINT_TBL(f1 point);
+INSERT INTO POINT_TBL(f1) VALUES
+  ('(0.0,0.0)'),
+  ('(-10.0,0.0)'),
+  ('(-3.0,4.0)'),
+  ('(5.1, 34.5)'),
+  ('(-5.0,-12.0)'),
+  ('(1e-300,-1e-300)'),  -- To underflow
+  ('(1e+300,Inf)'),  -- To overflow
+  ('(Inf,1e+300)'),  -- Transposed
+  (' ( Nan , NaN ) '),
+  ('10.0,10.0');
+-- We intentionally don't vacuum point_tbl here; geometry depends on that
+CREATE TABLE TEXT_TBL (f1 text);
+INSERT INTO TEXT_TBL VALUES
+  ('doh!'),
+  ('hi de ho neighbor');
+VACUUM TEXT_TBL;
+CREATE TABLE VARCHAR_TBL(f1 varchar(4));
+INSERT INTO VARCHAR_TBL (f1) VALUES
+  ('a'),
+  ('ab'),
+  ('abcd'),
+  ('abcd    ');
+VACUUM VARCHAR_TBL;
+CREATE TABLE onek (
+       unique1         int4,
+       unique2         int4,
+       two                     int4,
+       four            int4,
+       ten                     int4,
+       twenty          int4,
+       hundred         int4,
+       thousand        int4,
+       twothousand     int4,
+       fivethous       int4,
+       tenthous        int4,
+       odd                     int4,
+       even            int4,
+       stringu1        name,
+       stringu2        name,
+       string4         name
+);
+\set filename :abs_srcdir '/data/onek.data'
+COPY onek FROM :'filename';
+VACUUM ANALYZE onek;
+CREATE TABLE onek2 AS SELECT * FROM onek;
+VACUUM ANALYZE onek2;
+CREATE TABLE tenk1 (
+       unique1         int4,
+       unique2         int4,
+       two                     int4,
+       four            int4,
+       ten                     int4,
+       twenty          int4,
+       hundred         int4,
+       thousand        int4,
+       twothousand     int4,
+       fivethous       int4,
+       tenthous        int4,
+       odd                     int4,
+       even            int4,
+       stringu1        name,
+       stringu2        name,
+       string4         name
+);
+\set filename :abs_srcdir '/data/tenk.data'
+COPY tenk1 FROM :'filename';
+VACUUM ANALYZE tenk1;
+CREATE TABLE tenk2 AS SELECT * FROM tenk1;
+VACUUM ANALYZE tenk2;
+CREATE TABLE person (
+       name            text,
+       age                     int4,
+       location        point
+);
+\set filename :abs_srcdir '/data/person.data'
+COPY person FROM :'filename';
+VACUUM ANALYZE person;
+CREATE TABLE emp (
+       salary          int4,
+       manager         name
+) INHERITS (person);
+\set filename :abs_srcdir '/data/emp.data'
+COPY emp FROM :'filename';
+VACUUM ANALYZE emp;
+CREATE TABLE student (
+       gpa             float8
+) INHERITS (person);
+\set filename :abs_srcdir '/data/student.data'
+COPY student FROM :'filename';
+VACUUM ANALYZE student;
+CREATE TABLE stud_emp (
+       percent         int4
+) INHERITS (emp, student);
+NOTICE:  merging multiple inherited definitions of column "name"
+NOTICE:  merging multiple inherited definitions of column "age"
+NOTICE:  merging multiple inherited definitions of column "location"
+\set filename :abs_srcdir '/data/stud_emp.data'
+COPY stud_emp FROM :'filename';
+VACUUM ANALYZE stud_emp;
+CREATE TABLE road (
+       name            text,
+       thepath         path
+);
+\set filename :abs_srcdir '/data/streets.data'
+COPY road FROM :'filename';
+VACUUM ANALYZE road;
+CREATE TABLE ihighway () INHERITS (road);
+INSERT INTO ihighway
+   SELECT *
+   FROM ONLY road
+   WHERE name ~ 'I- .*';
+VACUUM ANALYZE ihighway;
+CREATE TABLE shighway (
+       surface         text
+) INHERITS (road);
+INSERT INTO shighway
+   SELECT *, 'asphalt'
+   FROM ONLY road
+   WHERE name ~ 'State Hwy.*';
+VACUUM ANALYZE shighway;
+--
+-- We must have some enum type in the database for opr_sanity and type_sanity.
+--
+create type stoplight as enum ('red', 'yellow', 'green');
+--
+-- Also create some non-built-in range types.
+--
+create type float8range as range (subtype = float8, subtype_diff = float8mi);
+create type textrange as range (subtype = text, collation = "C");
+--
+-- Create some C functions that will be used by various tests.
+--
+CREATE FUNCTION binary_coercible(oid, oid)
+    RETURNS bool
+    AS :'regresslib', 'binary_coercible'
+    LANGUAGE C STRICT STABLE PARALLEL SAFE;
+CREATE FUNCTION ttdummy ()
+    RETURNS trigger
+    AS :'regresslib'
+    LANGUAGE C;
+CREATE FUNCTION get_columns_length(oid[])
+    RETURNS int
+    AS :'regresslib'
+    LANGUAGE C STRICT STABLE PARALLEL SAFE;
+-- Use hand-rolled hash functions and operator classes to get predictable
+-- result on different machines.  The hash function for int4 simply returns
+-- the sum of the values passed to it and the one for text returns the length
+-- of the non-empty string value passed to it or 0.
+create function part_hashint4_noop(value int4, seed int8)
+    returns int8 as $$
+    select value + seed;
+    $$ language sql strict immutable parallel safe;
+create operator class part_test_int4_ops for type int4 using hash as
+    operator 1 =,
+    function 2 part_hashint4_noop(int4, int8);
+create function part_hashtext_length(value text, seed int8)
+    returns int8 as $$
+    select length(coalesce(value, ''))::int8
+    $$ language sql strict immutable parallel safe;
+create operator class part_test_text_ops for type text using hash as
+    operator 1 =,
+    function 2 part_hashtext_length(text, int8);
+--
+-- These functions are used in tests that used to use md5(), which we now
+-- mostly avoid so that the tests will pass in FIPS mode.
+--
+create function fipshash(bytea)
+    returns text
+    strict immutable parallel safe leakproof
+    return substr(encode(sha256($1), 'hex'), 1, 32);
+create function fipshash(text)
+    returns text
+    strict immutable parallel safe leakproof
+    return substr(encode(sha256($1::bytea), 'hex'), 1, 32);
diff --git a/contrib/pax_storage/src/test/regress/expected/update_gp.out 
b/contrib/pax_storage/src/test/regress/expected/update_gp.out
index 5ba13b9e821..065247fd685 100644
--- a/contrib/pax_storage/src/test/regress/expected/update_gp.out
+++ b/contrib/pax_storage/src/test/regress/expected/update_gp.out
@@ -413,7 +413,7 @@ EXPLAIN (COSTS OFF ) UPDATE tab3 SET C1 = C1 + 1, C5 = C5+1;
 ---------------------------------------------------------------
  Update on tab3
    ->  Explicit Redistribute Motion 3:3  (slice1; segments: 3)
-         ->  Split
+         ->  Split Update
                ->  Seq Scan on tab3
  Optimizer: Postgres query optimizer
 (5 rows)
diff --git 
a/contrib/pax_storage/src/test/regress/expected/variadic_parameters.out 
b/contrib/pax_storage/src/test/regress/expected/variadic_parameters.out
index 21ea403b4b1..4b87d99324e 100644
--- a/contrib/pax_storage/src/test/regress/expected/variadic_parameters.out
+++ b/contrib/pax_storage/src/test/regress/expected/variadic_parameters.out
@@ -25,19 +25,19 @@ select * from print_name;
 (3 rows)
 
 select pg_get_viewdef('print_name');
-                                 pg_get_viewdef                                
  
----------------------------------------------------------------------------------
-  SELECT concat(' '::text, VARIADIC ARRAY[people.fname, people.lname]) AS 
concat+
-    FROM people                                                                
 +
-   WHERE (people.id < 790);
+                          pg_get_viewdef                           
+-------------------------------------------------------------------
+  SELECT concat(' '::text, VARIADIC ARRAY[fname, lname]) AS concat+
+    FROM people                                                   +
+   WHERE (id < 790);
 (1 row)
 
 select pg_get_viewdef('print_name', true);
-                                 pg_get_viewdef                                
  
----------------------------------------------------------------------------------
-  SELECT concat(' '::text, VARIADIC ARRAY[people.fname, people.lname]) AS 
concat+
-    FROM people                                                                
 +
-   WHERE people.id < 790;
+                          pg_get_viewdef                           
+-------------------------------------------------------------------
+  SELECT concat(' '::text, VARIADIC ARRAY[fname, lname]) AS concat+
+    FROM people                                                   +
+   WHERE id < 790;
 (1 row)
 
 drop view print_name;
diff --git a/contrib/pax_storage/src/test/regress/expected/window_views.out 
b/contrib/pax_storage/src/test/regress/expected/window_views.out
index fe04dd7485c..accaf4d1b8c 100644
--- a/contrib/pax_storage/src/test/regress/expected/window_views.out
+++ b/contrib/pax_storage/src/test/regress/expected/window_views.out
@@ -9,9 +9,9 @@ create view v1 as
   select avg(a) over (partition by b)
   from testtab;
 select pg_get_viewdef('v1');
-                       pg_get_viewdef                        
--------------------------------------------------------------
-  SELECT avg(testtab.a) OVER (PARTITION BY testtab.b) AS avg+
+               pg_get_viewdef                
+---------------------------------------------
+  SELECT avg(a) OVER (PARTITION BY b) AS avg+
     FROM testtab;
 (1 row)
 
@@ -19,9 +19,9 @@ create view v2 as
   select avg(a) over (order by b)
   from testtab;
 select pg_get_viewdef('v2');
-                     pg_get_viewdef                      
----------------------------------------------------------
-  SELECT avg(testtab.a) OVER (ORDER BY testtab.b) AS avg+
+             pg_get_viewdef              
+-----------------------------------------
+  SELECT avg(a) OVER (ORDER BY b) AS avg+
     FROM testtab;
 (1 row)
 
@@ -29,9 +29,9 @@ create view v3 as
   select avg(a) over (partition by a order by b)
   from testtab;
 select pg_get_viewdef('v3');
-                                 pg_get_viewdef                                
 
---------------------------------------------------------------------------------
-  SELECT avg(testtab.a) OVER (PARTITION BY testtab.a ORDER BY testtab.b) AS 
avg+
+                     pg_get_viewdef                     
+--------------------------------------------------------
+  SELECT avg(a) OVER (PARTITION BY a ORDER BY b) AS avg+
     FROM testtab;
 (1 row)
 
@@ -39,10 +39,10 @@ create view v4 as
   select avg(a) over (w)
   from testtab window w as ();
 select pg_get_viewdef('v4');
-            pg_get_viewdef            
---------------------------------------
-  SELECT avg(testtab.a) OVER w AS avg+
-    FROM testtab                     +
+        pg_get_viewdef        
+------------------------------
+  SELECT avg(a) OVER w AS avg+
+    FROM testtab             +
    WINDOW w AS ();
 (1 row)
 
@@ -50,21 +50,21 @@ create view v5 as
   select avg(a) over (w order by b)
   from testtab window w as (partition by a);
 select pg_get_viewdef('v5');
-                      pg_get_viewdef                       
------------------------------------------------------------
-  SELECT avg(testtab.a) OVER (w ORDER BY testtab.b) AS avg+
-    FROM testtab                                          +
-   WINDOW w AS (PARTITION BY testtab.a);
+              pg_get_viewdef               
+-------------------------------------------
+  SELECT avg(a) OVER (w ORDER BY b) AS avg+
+    FROM testtab                          +
+   WINDOW w AS (PARTITION BY a);
 (1 row)
 
 create view v6 as
   select avg(a) over (w order by a)
   from testtab window w as ();
 select pg_get_viewdef('v6');
-                      pg_get_viewdef                       
------------------------------------------------------------
-  SELECT avg(testtab.a) OVER (w ORDER BY testtab.a) AS avg+
-    FROM testtab                                          +
+              pg_get_viewdef               
+-------------------------------------------
+  SELECT avg(a) OVER (w ORDER BY a) AS avg+
+    FROM testtab                          +
    WINDOW w AS ();
 (1 row)
 
@@ -72,44 +72,44 @@ create view v7 as
   select avg(a) over (w)
   from testtab window w as (order by a);
 select pg_get_viewdef('v7');
-            pg_get_viewdef            
---------------------------------------
-  SELECT avg(testtab.a) OVER w AS avg+
-    FROM testtab                     +
-   WINDOW w AS (ORDER BY testtab.a);
+        pg_get_viewdef        
+------------------------------
+  SELECT avg(a) OVER w AS avg+
+    FROM testtab             +
+   WINDOW w AS (ORDER BY a);
 (1 row)
 
 create view v8 as
   select avg(a) over (w)
   from testtab window w as (order by a rows between unbounded preceding and 
unbounded following);
 select pg_get_viewdef('v8');
-                                        pg_get_viewdef                         
               
-----------------------------------------------------------------------------------------------
-  SELECT avg(testtab.a) OVER w AS avg                                          
              +
-    FROM testtab                                                               
              +
-   WINDOW w AS (ORDER BY testtab.a ROWS BETWEEN UNBOUNDED PRECEDING AND 
UNBOUNDED FOLLOWING);
+                                    pg_get_viewdef                             
       
+--------------------------------------------------------------------------------------
+  SELECT avg(a) OVER w AS avg                                                  
      +
+    FROM testtab                                                               
      +
+   WINDOW w AS (ORDER BY a ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED 
FOLLOWING);
 (1 row)
 
 create view v9 as
   select avg(a) over (w)
   from testtab window w as (order by a rows between 1 preceding and 1 
following);
 select pg_get_viewdef('v9');
-                                pg_get_viewdef                                
-------------------------------------------------------------------------------
-  SELECT avg(testtab.a) OVER w AS avg                                        +
-    FROM testtab                                                             +
-   WINDOW w AS (ORDER BY testtab.a ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING);
+                            pg_get_viewdef                            
+----------------------------------------------------------------------
+  SELECT avg(a) OVER w AS avg                                        +
+    FROM testtab                                                     +
+   WINDOW w AS (ORDER BY a ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING);
 (1 row)
 
 create view v10 as
   select avg(a) over (w rows between 1 preceding and 1 following)
   from testtab window w as (order by a);
 select pg_get_viewdef('v10');
-                                 pg_get_viewdef                                
  
----------------------------------------------------------------------------------
-  SELECT avg(testtab.a) OVER (w ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) AS 
avg+
-    FROM testtab                                                               
 +
-   WINDOW w AS (ORDER BY testtab.a);
+                             pg_get_viewdef                              
+-------------------------------------------------------------------------
+  SELECT avg(a) OVER (w ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) AS avg+
+    FROM testtab                                                        +
+   WINDOW w AS (ORDER BY a);
 (1 row)
 
 -- Check that COUNT(*) is dumped with the star intact.
@@ -117,9 +117,9 @@ create view v_star as
   select count(*) over (partition by a)
   from testtab;
 select pg_get_viewdef('v_star');
-                     pg_get_viewdef                      
----------------------------------------------------------
-  SELECT count(*) OVER (PARTITION BY testtab.a) AS count+
+                 pg_get_viewdef                  
+-------------------------------------------------
+  SELECT count(*) OVER (PARTITION BY a) AS count+
     FROM testtab;
 (1 row)
 
diff --git a/contrib/pax_storage/src/test/regress/output/gpcopy.source 
b/contrib/pax_storage/src/test/regress/output/gpcopy.source
index 667cd9d9e6f..60e6305446b 100755
--- a/contrib/pax_storage/src/test/regress/output/gpcopy.source
+++ b/contrib/pax_storage/src/test/regress/output/gpcopy.source
@@ -482,6 +482,7 @@ COPY copy_regression_newline from stdin with delimiter '|' 
newline 'cr' csv;
 ERROR:  extra data after last expected column
 CONTEXT:  COPY xxxxx line x: xxx
 2|2
+\.
 "
 -- negative: invalid newline
 COPY copy_regression_newline from stdin with delimiter '|' newline 'blah';
diff --git a/contrib/pax_storage/src/test/regress/output/table_functions.source 
b/contrib/pax_storage/src/test/regress/output/table_functions.source
index 8ae10a3caeb..d74744f5f14 100644
--- a/contrib/pax_storage/src/test/regress/output/table_functions.source
+++ b/contrib/pax_storage/src/test/regress/output/table_functions.source
@@ -2246,8 +2246,8 @@ SELECT * FROM v1 order by a, b;
  a      | integer |           |          |         | plain    | 
  b      | text    |           |          |         | extended | 
 View definition:
- SELECT tf.a,
-    tf.b
+ SELECT a,
+    b
    FROM multiset_2(TABLE( SELECT example.a,
             example.b
            FROM example)) tf;
@@ -2255,8 +2255,8 @@ View definition:
 SELECT pg_get_viewdef('v1'::regclass);
                pg_get_viewdef                
 ---------------------------------------------
-  SELECT tf.a,                              +
-     tf.b                                   +
+  SELECT a,                                 +
+     b                                      +
     FROM multiset_2(TABLE( SELECT example.a,+
              example.b                      +
             FROM example)) tf;
@@ -2286,8 +2286,8 @@ SELECT * FROM v2 order by a, b;
  a      | integer |           |          |         | plain    | 
  b      | text    |           |          |         | extended | 
 View definition:
- SELECT tf.a,
-    tf.b
+ SELECT a,
+    b
    FROM multiset_2(TABLE( SELECT example.a,
             example.b
            FROM example
@@ -2296,8 +2296,8 @@ View definition:
 SELECT pg_get_viewdef('v2'::regclass);
                      pg_get_viewdef                     
 --------------------------------------------------------
-  SELECT tf.a,                                         +
-     tf.b                                              +
+  SELECT a,                                            +
+     b                                                 +
     FROM multiset_2(TABLE( SELECT example.a,           +
              example.b                                 +
             FROM example                               +
@@ -2328,8 +2328,8 @@ SELECT * FROM v3 order by a, b;
  a      | integer |           |          |         | plain    | 
  b      | text    |           |          |         | extended | 
 View definition:
- SELECT tf.a,
-    tf.b
+ SELECT a,
+    b
    FROM multiset_2(TABLE( SELECT example.a,
             example.b
            FROM example
@@ -2338,8 +2338,8 @@ View definition:
 SELECT pg_get_viewdef('v3'::regclass);
                pg_get_viewdef                
 ---------------------------------------------
-  SELECT tf.a,                              +
-     tf.b                                   +
+  SELECT a,                                 +
+     b                                      +
     FROM multiset_2(TABLE( SELECT example.a,+
              example.b                      +
             FROM example                    +
diff --git a/contrib/pax_storage/src/test/regress/sql/gp_aggregates.sql 
b/contrib/pax_storage/src/test/regress/sql/gp_aggregates.sql
index 1704b26c7ce..496990efded 100644
--- a/contrib/pax_storage/src/test/regress/sql/gp_aggregates.sql
+++ b/contrib/pax_storage/src/test/regress/sql/gp_aggregates.sql
@@ -123,11 +123,11 @@ create aggregate mysum_prefunc(int4) (
 -- tweak settings to force multistage agg to be used
 set gp_motion_cost_per_row = 1000;
 set optimizer_force_multistage_agg = on;
-set force_parallel_mode = off;
+set debug_parallel_query = off;
 select mysum_prefunc(a::int4) from aggtest;
 reset gp_motion_cost_per_row;
 reset optimizer_force_multistage_agg;
-reset force_parallel_mode;
+reset debug_parallel_query;
 
 
 -- Test an aggregate with 'internal' transition type, and a combine function,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to