diff --strip-trailing-cr -U3 C:/cirrus/contrib/postgres_fdw/expected/postgres_fdw.out C:/cirrus/build/testrun/postgres_fdw/regress/results/postgres_fdw.out --- C:/cirrus/contrib/postgres_fdw/expected/postgres_fdw.out 2026-04-28 17:20:15.630553400 +0000 +++ C:/cirrus/build/testrun/postgres_fdw/regress/results/postgres_fdw.out 2026-04-28 17:30:10.046740500 +0000 @@ -3016,13 +3016,16 @@ -- GROUP BY clause having expressions explain (verbose, costs off) select c2/2, sum(c2) * (c2/2) from ft1 group by c2/2 order by c2/2; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------- - Foreign Scan + QUERY PLAN +--------------------------------------------------------------------------------------- + Sort Output: ((c2 / 2)), ((sum(c2) * (c2 / 2))) - Relations: Aggregate on (public.ft1) - Remote SQL: SELECT (c2 / 2), (sum(c2) * (c2 / 2)) FROM "S 1"."T 1" GROUP BY 1 ORDER BY (c2 / 2) ASC NULLS LAST -(4 rows) + Sort Key: ((ft1.c2 / 2)) + -> Foreign Scan + Output: ((c2 / 2)), ((sum(c2) * (c2 / 2))) + Relations: Aggregate on (public.ft1) + Remote SQL: SELECT (c2 / 2), (sum(c2) * (c2 / 2)) FROM "S 1"."T 1" GROUP BY 1 +(7 rows) select c2/2, sum(c2) * (c2/2) from ft1 group by c2/2 order by c2/2; ?column? | ?column? @@ -3103,13 +3106,16 @@ -- GROUP BY clause in various forms, cardinal, alias and constant expression explain (verbose, costs off) select count(c2) w, c2 x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; - QUERY PLAN ------------------------------------------------------------------------------------------------------------ - Foreign Scan + QUERY PLAN +-------------------------------------------------------------------------------------- + Sort Output: (count(*)), c2, 5, 7.0, 9 - Relations: Aggregate on (public.ft1) - Remote SQL: SELECT count(*), c2, 5, 7.0, 9 FROM "S 1"."T 1" GROUP BY 2, 3, 5 ORDER BY c2 ASC NULLS LAST -(4 rows) + Sort Key: ft1.c2 + -> Foreign Scan + Output: (count(*)), c2, 5, 7.0, 9 + Relations: Aggregate on (public.ft1) + Remote SQL: SELECT count(*), c2, 5, 7.0, 9 FROM "S 1"."T 1" GROUP BY 2, 3, 5 +(7 rows) select count(c2) w, c2 x, 5 y, 7.0 z from ft1 group by 2, y, 9.0::int order by 2; w | x | y | z @@ -3149,13 +3155,16 @@ -- Testing HAVING clause shippability explain (verbose, costs off) select c2, sum(c1) from ft2 group by c2 having avg(c1) < 500 and sum(c1) < 49800 order by c2; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------- + Sort Output: c2, (sum(c1)) - Relations: Aggregate on (public.ft2) - Remote SQL: SELECT c2, sum("C 1") FROM "S 1"."T 1" GROUP BY 1 HAVING ((avg("C 1") < 500::numeric)) AND ((sum("C 1") < 49800)) ORDER BY c2 ASC NULLS LAST -(4 rows) + Sort Key: ft2.c2 + -> Foreign Scan + Output: c2, (sum(c1)) + Relations: Aggregate on (public.ft2) + Remote SQL: SELECT c2, sum("C 1") FROM "S 1"."T 1" GROUP BY 1 HAVING ((avg("C 1") < 500::numeric)) AND ((sum("C 1") < 49800)) +(7 rows) select c2, sum(c1) from ft2 group by c2 having avg(c1) < 500 and sum(c1) < 49800 order by c2; c2 | sum @@ -6415,13 +6424,13 @@ -> Sort Output: ft2.ctid, ft2.*, ft2.c2, ft4.*, ft4.c1, ft4.c2, ft4.c3 Sort Key: ft2.c2 - -> Hash Join + -> Nested Loop Output: ft2.ctid, ft2.*, ft2.c2, ft4.*, ft4.c1, ft4.c2, ft4.c3 - Hash Cond: (ft2.c2 = ft4.c1) + Join Filter: (ft2.c2 = ft4.c1) -> Foreign Scan on public.ft2 Output: ft2.ctid, ft2.*, ft2.c2 Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8, ctid FROM "S 1"."T 1" WHERE (("C 1" > 1200)) FOR UPDATE - -> Hash + -> Materialize Output: ft4.*, ft4.c1, ft4.c2, ft4.c3 -> Foreign Scan on public.ft4 Output: ft4.*, ft4.c1, ft4.c2, ft4.c3