diff --git a/src/test/regress/expected/gpdtm_plpgsql.out b/src/test/regress/expected/gpdtm_plpgsql.out index 79529777015..9092fb8c830 100644 --- a/src/test/regress/expected/gpdtm_plpgsql.out +++ b/src/test/regress/expected/gpdtm_plpgsql.out @@ -536,18 +536,30 @@ CREATE TABLE test_parse_arr (a bigserial, b int[]); NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Cloudberry Database data distribution key for this table. HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew. INSERT INTO test_parse_arr (b) - SELECT parse_arr(x) FROM - ( - SELECT '(1, 2, 3)' AS x - UNION ALL - SELECT NULL - ) AS q; -SELECT * FROM test_parse_arr ORDER BY a; - a | b ----+----------- - 1 | {{1,2,3}} - 2 | -(2 rows) + SELECT parse_arr(x) FROM + ( + SELECT '(1, 2, 3)' AS x + UNION ALL + SELECT NULL AS x + UNION ALL + SELECT '(4, 5, 6)' AS x + ORDER BY x + ) AS q; +SELECT a FROM test_parse_arr ORDER BY a; + a +--- + 1 + 2 + 3 +(3 rows) + +SELECT b FROM test_parse_arr ORDER BY b; + b +----------- + {{1,2,3}} + {{4,5,6}} + +(3 rows) -- -- Test if sequence server information outlives a plpgsql exception and corresponding subtransaction rollback (MPP-25193) diff --git a/src/test/regress/sql/gpdtm_plpgsql.sql b/src/test/regress/sql/gpdtm_plpgsql.sql index 351a4a78d87..4d28db11cfe 100644 --- a/src/test/regress/sql/gpdtm_plpgsql.sql +++ b/src/test/regress/sql/gpdtm_plpgsql.sql @@ -302,14 +302,19 @@ $dbvis$ LANGUAGE plpgsql; CREATE TABLE test_parse_arr (a bigserial, b int[]); INSERT INTO test_parse_arr (b) - SELECT parse_arr(x) FROM - ( - SELECT '(1, 2, 3)' AS x - UNION ALL - SELECT NULL - ) AS q; - -SELECT * FROM test_parse_arr ORDER BY a; + SELECT parse_arr(x) FROM + ( + SELECT '(1, 2, 3)' AS x + UNION ALL + SELECT NULL AS x + UNION ALL + SELECT '(4, 5, 6)' AS x + ORDER BY x + ) AS q; + +SELECT a FROM test_parse_arr ORDER BY a; + +SELECT b FROM test_parse_arr ORDER BY b; -- -- Test if sequence server information outlives a plpgsql exception and corresponding subtransaction rollback (MPP-25193)