{"Entry":{"collection":"hook","key":"set_join_pathlist_hook","name":"set_join_pathlist_hook","aliases":[],"metadata":{"aliases":[],"category":"Query planning","content_hash":"7e4c49ea976a416e09eb6e8fef1fac0ffa4192068e77e6acbad3871417f5a432","imported_at":"2026-09-27T17:57:58.886396+08:00","name":"set_join_pathlist_hook","name_zh":"set_join_pathlist_hook","slug":"set_join_pathlist_hook","summary":"Hook for plugins to get control in add_paths_to_joinrel()"}},"Definition":{"Collection":"hook","Key":"set_join_pathlist_hook","SourceDatabase":"center","Version":"18","SourceTable":"hook","SourceKey":"set_join_pathlist_hook","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","Facts":{"description":["Hook for plugins to get control in add_paths_to_joinrel()"],"facts":[{"label":"Interface type","value":"set_join_pathlist_hook_type"},{"label":"Header","value":"src/include/optimizer/paths.h"},{"label":"Subsystem","value":"Query planning"},{"label":"Initial value","value":"NULL (no hook installed)"}],"related":[{"label":"The Planner/Optimizer","url":"/docs/18/planner-optimizer.html"}],"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sections":[{"paragraphs":["6. Finally, give extensions a chance to manipulate the path list. They could add new paths (such as CustomPaths) by calling add_path(), or add_partial_path() if parallel aware. They could also delete or modify paths added by the core code."],"title":"Core source comments"},{"paragraphs":["src/backend/optimizer/path/joinpath.c:343"],"title":"Call sites"},{"code":"\t * 6. Finally, give extensions a chance to manipulate the path list.  They\n\t * could add new paths (such as CustomPaths) by calling add_path(), or\n\t * add_partial_path() if parallel aware.  They could also delete or modify\n\t * paths added by the core code.\n\t */\n\tif (set_join_pathlist_hook)\n\t\tset_join_pathlist_hook(root, joinrel, outerrel, innerrel,\n\t\t\t\t\t\t\t   jointype, \u0026extra);\n}\n\n/*\n * We override the param_source_rels heuristic to accept nestloop paths in\n * which the outer rel satisfies some but not all of the inner path's\n * parameterization.  This is necessary to get good plans for star-schema\n * scenarios, in which a parameterized path for a large table may require","paragraphs":[],"title":"Core call context: src/backend/optimizer/path/joinpath.c:337–351"}],"signature":"typedef void (*set_join_pathlist_hook_type) (PlannerInfo *root, RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel, JoinType jointype, JoinPathExtraData *extra);\nextern PGDLLIMPORT set_join_pathlist_hook_type set_join_pathlist_hook;","sources":[{"label":"Interface declaration","path":"src/include/optimizer/paths.h","sha256":"bf497b2e5501e7c86250147c9cc779785ccec7bb2a806d3c71571313e890208f","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/optimizer/paths.h#L37"},{"label":"Core definition","path":"src/backend/optimizer/path/joinpath.c","sha256":"03bf45577e4b5c70a6d9e9d2a0bb595846b0bedd7dde4ad4e7a48e5bc308e4c8","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/optimizer/path/joinpath.c#L33"},{"label":"Call sites","path":"src/backend/optimizer/path/joinpath.c","sha256":"03bf45577e4b5c70a6d9e9d2a0bb595846b0bedd7dde4ad4e7a48e5bc308e4c8","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/optimizer/path/joinpath.c#L343"}]},"ManualEvidence":{"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sources":[{"label":"Interface declaration","path":"src/include/optimizer/paths.h","sha256":"bf497b2e5501e7c86250147c9cc779785ccec7bb2a806d3c71571313e890208f","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/optimizer/paths.h#L37"},{"label":"Core definition","path":"src/backend/optimizer/path/joinpath.c","sha256":"03bf45577e4b5c70a6d9e9d2a0bb595846b0bedd7dde4ad4e7a48e5bc308e4c8","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/optimizer/path/joinpath.c#L33"},{"label":"Call sites","path":"src/backend/optimizer/path/joinpath.c","sha256":"03bf45577e4b5c70a6d9e9d2a0bb595846b0bedd7dde4ad4e7a48e5bc308e4c8","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/optimizer/path/joinpath.c#L343"}]},"MeasuredEvidence":{}},"Text":{"Collection":"hook","Key":"set_join_pathlist_hook","SourceDatabase":"center","Version":"18","Locale":"en","Title":"set_join_pathlist_hook","Summary":"Hook for plugins to get control in add_paths_to_joinrel()","BodyHTML":"\u003cp\u003eHook for plugins to get control in add_paths_to_joinrel()\u003c/p\u003e","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","ContentHash":"910dfe70f08824386ba2ec628da79bf11c1b7ef5d367a065aa92e1a23fc51cfd","Payload":{"description":["Hook for plugins to get control in add_paths_to_joinrel()"],"related":[{"label":"The Planner/Optimizer","url":"/docs/18/planner-optimizer.html"}],"sections":[{"paragraphs":["6. Finally, give extensions a chance to manipulate the path list. They could add new paths (such as CustomPaths) by calling add_path(), or add_partial_path() if parallel aware. They could also delete or modify paths added by the core code."],"title":"Core source comments"},{"paragraphs":["src/backend/optimizer/path/joinpath.c:343"],"title":"Call sites"},{"code":"\t * 6. Finally, give extensions a chance to manipulate the path list.  They\n\t * could add new paths (such as CustomPaths) by calling add_path(), or\n\t * add_partial_path() if parallel aware.  They could also delete or modify\n\t * paths added by the core code.\n\t */\n\tif (set_join_pathlist_hook)\n\t\tset_join_pathlist_hook(root, joinrel, outerrel, innerrel,\n\t\t\t\t\t\t\t   jointype, \u0026extra);\n}\n\n/*\n * We override the param_source_rels heuristic to accept nestloop paths in\n * which the outer rel satisfies some but not all of the inner path's\n * parameterization.  This is necessary to get good plans for star-schema\n * scenarios, in which a parameterized path for a large table may require","paragraphs":[],"title":"Core call context: src/backend/optimizer/path/joinpath.c:337–351"}]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
