aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/citext/expected/citext.out2
-rw-r--r--contrib/citext/expected/citext_1.out2
-rw-r--r--contrib/postgres_fdw/expected/postgres_fdw.out19
-rw-r--r--src/backend/optimizer/path/costsize.c6
4 files changed, 16 insertions, 13 deletions
diff --git a/contrib/citext/expected/citext.out b/contrib/citext/expected/citext.out
index 9cc94f4c1bd..bc5d92eb917 100644
--- a/contrib/citext/expected/citext.out
+++ b/contrib/citext/expected/citext.out
@@ -2336,8 +2336,8 @@ SELECT *
WHERE t.id IS NULL OR m.id IS NULL;
id | name | id | name
----+------+----+------
- 2 | two | |
| | 2 | Two
+ 2 | two | |
(2 rows)
REFRESH MATERIALIZED VIEW CONCURRENTLY citext_matview;
diff --git a/contrib/citext/expected/citext_1.out b/contrib/citext/expected/citext_1.out
index d1fb1e14e02..3d02d06b9c3 100644
--- a/contrib/citext/expected/citext_1.out
+++ b/contrib/citext/expected/citext_1.out
@@ -2336,8 +2336,8 @@ SELECT *
WHERE t.id IS NULL OR m.id IS NULL;
id | name | id | name
----+------+----+------
- 2 | two | |
| | 2 | Two
+ 2 | two | |
(2 rows)
REFRESH MATERIALIZED VIEW CONCURRENTLY citext_matview;
diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out
index 9c0328eb63c..f6bb2fc472c 100644
--- a/contrib/postgres_fdw/expected/postgres_fdw.out
+++ b/contrib/postgres_fdw/expected/postgres_fdw.out
@@ -4226,18 +4226,21 @@ explain (verbose, costs off) select * from ft3 where f2 = 'foo' COLLATE "C";
explain (verbose, costs off) select * from ft3 f, loct3 l
where f.f3 = l.f3 COLLATE "POSIX" and l.f1 = 'foo';
- QUERY PLAN
----------------------------------------------------------
- Nested Loop
+ QUERY PLAN
+-------------------------------------------------------------
+ Hash Join
Output: f.f1, f.f2, f.f3, l.f1, l.f2, l.f3
- Join Filter: ((f.f3)::text = (l.f3)::text)
- -> Index Scan using loct3_f1_key on public.loct3 l
- Output: l.f1, l.f2, l.f3
- Index Cond: (l.f1 = 'foo'::text)
+ Inner Unique: true
+ Hash Cond: ((f.f3)::text = (l.f3)::text)
-> Foreign Scan on public.ft3 f
Output: f.f1, f.f2, f.f3
Remote SQL: SELECT f1, f2, f3 FROM public.loct3
-(9 rows)
+ -> Hash
+ Output: l.f1, l.f2, l.f3
+ -> Index Scan using loct3_f1_key on public.loct3 l
+ Output: l.f1, l.f2, l.f3
+ Index Cond: (l.f1 = 'foo'::text)
+(12 rows)
-- ===================================================================
-- test writable foreign table stuff
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 0cb9a88790f..7f867530d47 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -3180,10 +3180,10 @@ final_cost_hashjoin(PlannerInfo *root, HashPath *path,
clamp_row_est(inner_path_rows / virtualbuckets) * 0.05;
/* Get # of tuples that will pass the basic join */
- if (path->jpath.jointype == JOIN_SEMI)
- hashjointuples = outer_matched_rows;
- else
+ if (path->jpath.jointype == JOIN_ANTI)
hashjointuples = outer_path_rows - outer_matched_rows;
+ else
+ hashjointuples = outer_matched_rows;
}
else
{