Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9502227

Browse files
committed
postgres_fdw: Fix test that didn't test what it claimed.
Antonin Houska reported that the planner does consider pushingpostgres_fdw_abs() to the remote side, which happens because we makeit shippable earlier in the test case file.Jeevan Chalke provided this patch, which changes the joincondition to use random(), which is not shippable, instead.Antonin reviewed the patch.Discussion:http://postgr.es/m/15265.1511985971@localhost
1 parent87c37e3 commit9502227

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

‎contrib/postgres_fdw/expected/postgres_fdw.out

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3160,21 +3160,23 @@ drop operator public.<^(int, int);
31603160
-- Input relation to aggregate push down hook is not safe to pushdown and thus
31613161
-- the aggregate cannot be pushed down to foreign server.
31623162
explain (verbose, costs off)
3163-
select count(t1.c3) fromft1 t1, ft1t2wheret1.c1 =postgres_fdw_abs(t1.c2);
3164-
QUERY PLAN
3165-
----------------------------------------------------------------------------------------------------------
3163+
select count(t1.c3) fromft2 t1 left join ft2t2on (t1.c1 =random() * t2.c2);
3164+
QUERY PLAN
3165+
-------------------------------------------------------------------------------------------
31663166
Aggregate
31673167
Output: count(t1.c3)
3168-
-> Nested Loop
3168+
-> Nested Loop Left Join
31693169
Output: t1.c3
3170-
-> Foreign Scan on public.ft1 t2
3171-
Remote SQL: SELECT NULL FROM "S 1"."T 1"
3170+
Join Filter: ((t1.c1)::double precision = (random() * (t2.c2)::double precision))
3171+
-> Foreign Scan on public.ft2 t1
3172+
Output: t1.c3, t1.c1
3173+
Remote SQL: SELECT "C 1", c3 FROM "S 1"."T 1"
31723174
-> Materialize
3173-
Output:t1.c3
3174-
-> Foreign Scan on public.ft1 t1
3175-
Output:t1.c3
3176-
Remote SQL: SELECTc3 FROM "S 1"."T 1" WHERE (("C 1" = public.postgres_fdw_abs(c2)))
3177-
(11 rows)
3175+
Output:t2.c2
3176+
-> Foreign Scan on public.ft2 t2
3177+
Output:t2.c2
3178+
Remote SQL: SELECTc2 FROM "S 1"."T 1"
3179+
(13 rows)
31783180

31793181
-- Subquery in FROM clause having aggregate
31803182
explain (verbose, costs off)

‎contrib/postgres_fdw/sql/postgres_fdw.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ drop operator public.<^(int, int);
829829
-- Input relation to aggregate push down hook is not safe to pushdown and thus
830830
-- the aggregate cannot be pushed down to foreign server.
831831
explain (verbose, costs off)
832-
selectcount(t1.c3)fromft1 t1, ft1t2wheret1.c1=postgres_fdw_abs(t1.c2);
832+
selectcount(t1.c3)fromft2 t1left join ft2t2on (t1.c1=random()*t2.c2);
833833

834834
-- Subquery in FROM clause having aggregate
835835
explain (verbose, costs off)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp