Skip to content

Commit 6be84ee

Browse files
committed
Update more comments for 96198d9.
Etsuro Fujita, reviewed (though not completely endorsed) by Ashutosh Bapat, and slightly expanded by me.
1 parent 74a379b commit 6be84ee

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

contrib/postgres_fdw/postgres_fdw.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3349,10 +3349,8 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
33493349
*
33503350
* 1) Join type is INNER or OUTER (one of LEFT/RIGHT/FULL)
33513351
* 2) Both outer and inner portions are safe to push-down
3352-
* 3) All foreign tables in the join belong to the same foreign server and use
3353-
* the same user mapping.
3354-
* 4) All join conditions are safe to push down
3355-
* 5) No relation has local filter (this can be relaxed for INNER JOIN, if we
3352+
* 3) All join conditions are safe to push down
3353+
* 4) No relation has local filter (this can be relaxed for INNER JOIN, if we
33563354
* can move unpushable clauses upwards in the join tree).
33573355
*/
33583356
static bool

src/backend/optimizer/path/joinpath.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ add_paths_to_joinrel(PlannerInfo *root,
213213

214214
/*
215215
* 5. If inner and outer relations are foreign tables (or joins) belonging
216-
* to the same server, give the FDW a chance to push down joins.
216+
* to the same server and using the same user mapping, give the FDW a
217+
* chance to push down joins.
217218
*/
218219
if (joinrel->fdwroutine &&
219220
joinrel->fdwroutine->GetForeignJoinPaths)

src/include/nodes/relation.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,9 +448,11 @@ typedef struct PlannerInfo
448448
* in just as for a baserel, except we don't bother with lateral_vars.
449449
*
450450
* If the relation is either a foreign table or a join of foreign tables that
451-
* all belong to the same foreign server, these fields will be set:
451+
* all belong to the same foreign server and use the same user mapping, these
452+
* fields will be set:
452453
*
453454
* serverid - OID of foreign server, if foreign table (else InvalidOid)
455+
* umid - OID of user mapping, if foreign table (else InvalidOid)
454456
* fdwroutine - function hooks for FDW, if foreign table (else NULL)
455457
* fdw_private - private state for FDW, if foreign table (else NULL)
456458
*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy