{"kind": "hook", "major": "18", "item": {"slug": "build_simple_rel_hook", "name": "build_simple_rel_hook", "name_zh": "build_simple_rel_hook", "category": "Query planning", "summary": "Not recorded in the selected version.", "aliases": [], "versions": {"19": {"facts": [{"label": "Interface type", "value": "build_simple_rel_hook_type"}, {"label": "Header", "value": "src/include/optimizer/pathnode.h"}, {"label": "Subsystem", "value": "Query planning"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/19/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_19_BETA4", "label": "19 Beta 4", "major": "19", "channel": "preview", "revision": "b73d13c32c834a2c8e1c60cb92f79530376cedf1"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/b73d13c32c834a2c8e1c60cb92f79530376cedf1/src/include/optimizer/pathnode.h#L21", "path": "src/include/optimizer/pathnode.h", "label": "Interface declaration", "sha256": "7f5594bdaa1a3cd656ab9a8174fc3ba3d1b25ddf79773e5f8063b939413d1fd9"}, {"url": "https://github.com/postgres/postgres/blob/b73d13c32c834a2c8e1c60cb92f79530376cedf1/src/backend/optimizer/util/relnode.c#L51", "path": "src/backend/optimizer/util/relnode.c", "label": "Core definition", "sha256": "dfd2d60bc2c491994252e13535d194cae43f43fc15128b5a1207dc3a04b10d8a"}, {"url": "https://github.com/postgres/postgres/blob/b73d13c32c834a2c8e1c60cb92f79530376cedf1/src/backend/optimizer/util/relnode.c#L410", "path": "src/backend/optimizer/util/relnode.c", "label": "Call sites", "sha256": "dfd2d60bc2c491994252e13535d194cae43f43fc15128b5a1207dc3a04b10d8a"}], "sections": [{"title": "Core source comments", "paragraphs": ["Allow a plugin to editorialize on the new RelOptInfo. This could involve editorializing on the information which get_relation_info obtained from the catalogs, such as altering the assumed relation size, removing an index, or adding a hypothetical index to the indexlist. An extension can also modify rel->pgs_mask here to control path generation."]}, {"title": "Call sites", "paragraphs": ["src/backend/optimizer/util/relnode.c:410"]}, {"code": "\t * removing an index, or adding a hypothetical index to the indexlist.\n\t *\n\t * An extension can also modify rel->pgs_mask here to control path\n\t * generation.\n\t */\n\tif (build_simple_rel_hook)\n\t\t(*build_simple_rel_hook) (root, rel, rte);\n\n\t/*\n\t * Apply the parent's quals to the child, with appropriate substitution of\n\t * variables.  If any resulting clause is reduced to constant FALSE or\n\t * NULL, apply_child_basequals returns false to indicate that scanning\n\t * this relation won't yield any rows.  In this case, we mark the child as\n\t * dummy right away.  (We must do this immediately so that pruning works\n\t * correctly when recursing in expand_partitioned_rtentry.)", "title": "Core call context: src/backend/optimizer/util/relnode.c:404\u2013418", "paragraphs": []}], "signature": "typedef void (*build_simple_rel_hook_type) (PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte);\nextern PGDLLIMPORT build_simple_rel_hook_type build_simple_rel_hook;", "description": ["Hook for plugins to get control in build_simple_rel()"]}, "20": {"facts": [{"label": "Interface type", "value": "build_simple_rel_hook_type"}, {"label": "Header", "value": "src/include/optimizer/pathnode.h"}, {"label": "Subsystem", "value": "Query planning"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/devel/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "master", "label": "20 devel", "major": "20", "channel": "devel", "revision": "2c10c2ce4d7bcd57543a49ab402af02a39724e0a"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/2c10c2ce4d7bcd57543a49ab402af02a39724e0a/src/include/optimizer/pathnode.h#L21", "path": "src/include/optimizer/pathnode.h", "label": "Interface declaration", "sha256": "7f5594bdaa1a3cd656ab9a8174fc3ba3d1b25ddf79773e5f8063b939413d1fd9"}, {"url": "https://github.com/postgres/postgres/blob/2c10c2ce4d7bcd57543a49ab402af02a39724e0a/src/backend/optimizer/util/relnode.c#L51", "path": "src/backend/optimizer/util/relnode.c", "label": "Core definition", "sha256": "e4d52530d522808857981ecf0b5943d10844732c06f18a4e4b2323afbd58b67d"}, {"url": "https://github.com/postgres/postgres/blob/2c10c2ce4d7bcd57543a49ab402af02a39724e0a/src/backend/optimizer/util/relnode.c#L413", "path": "src/backend/optimizer/util/relnode.c", "label": "Call sites", "sha256": "e4d52530d522808857981ecf0b5943d10844732c06f18a4e4b2323afbd58b67d"}], "sections": [{"title": "Core source comments", "paragraphs": ["Allow a plugin to editorialize on the new RelOptInfo. This could involve editorializing on the information which get_relation_info obtained from the catalogs, such as altering the assumed relation size, removing an index, or adding a hypothetical index to the indexlist. An extension can also modify rel->pgs_mask here to control path generation."]}, {"title": "Call sites", "paragraphs": ["src/backend/optimizer/util/relnode.c:413"]}, {"code": "\t * removing an index, or adding a hypothetical index to the indexlist.\n\t *\n\t * An extension can also modify rel->pgs_mask here to control path\n\t * generation.\n\t */\n\tif (build_simple_rel_hook)\n\t\t(*build_simple_rel_hook) (root, rel, rte);\n\n\t/*\n\t * Apply the parent's quals to the child, with appropriate substitution of\n\t * variables.  If any resulting clause is reduced to constant FALSE or\n\t * NULL, apply_child_basequals returns false to indicate that scanning\n\t * this relation won't yield any rows.  In this case, we mark the child as\n\t * dummy right away.  (We must do this immediately so that pruning works\n\t * correctly when recursing in expand_partitioned_rtentry.)", "title": "Core call context: src/backend/optimizer/util/relnode.c:407\u2013421", "paragraphs": []}], "signature": "typedef void (*build_simple_rel_hook_type) (PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte);\nextern PGDLLIMPORT build_simple_rel_hook_type build_simple_rel_hook;", "description": ["Hook for plugins to get control in build_simple_rel()"]}}, "content_hash": "95bc6a6f6a9539741e7d1de6762f0ba017defc28323247c5fdf46b5cad350be7", "imported_at": "2026-09-27T09:57:58.868"}, "snapshot": null, "comparison": {"left": "18", "right": "19", "status": "added", "diff": "--- PostgreSQL 18\n+++ PostgreSQL 19\n@@ -1 +1,22 @@\n-Not recorded in this version\n+{\n+  \"facts\": [\n+    {\n+      \"label\": \"Interface type\",\n+      \"value\": \"build_simple_rel_hook_type\"\n+    },\n+    {\n+      \"label\": \"Header\",\n+      \"value\": \"src/include/optimizer/pathnode.h\"\n+    },\n+    {\n+      \"label\": \"Subsystem\",\n+      \"value\": \"Query planning\"\n+    },\n+    {\n+      \"label\": \"Initial value\",\n+      \"value\": \"NULL (no hook installed)\"\n+    }\n+  ],\n+  \"signature\": \"typedef void (*build_simple_rel_hook_type) (PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte);\\nextern PGDLLIMPORT build_simple_rel_hook_type build_simple_rel_hook;\",\n+  \"tables\": null\n+}"}}