{"kind": "hook", "major": "18", "item": {"slug": "get_index_stats_hook", "name": "get_index_stats_hook", "name_zh": "get_index_stats_hook", "category": "Statistics and estimation", "summary": "get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below.", "aliases": [], "versions": {"10": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/10/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_10_STABLE", "label": "10", "major": "10", "channel": "historical", "revision": "f4e8f137bfb08a664c8288824c1e36b5143ac875"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/f4e8f137bfb08a664c8288824c1e36b5143ac875/src/include/utils/selfuncs.h#L147", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "6403861cc3a1cbe440f954519c911414d5b18530fda92c6e2ef8612075e74b30"}, {"url": "https://github.com/postgres/postgres/blob/f4e8f137bfb08a664c8288824c1e36b5143ac875/src/backend/utils/adt/selfuncs.c#L156", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "288b5af493935cc76448085b2bdc43b5334a3b8eb2e30837135a4849d77c4c7b"}, {"url": "https://github.com/postgres/postgres/blob/f4e8f137bfb08a664c8288824c1e36b5143ac875/src/backend/utils/adt/selfuncs.c#L4778", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "288b5af493935cc76448085b2bdc43b5334a3b8eb2e30837135a4849d77c4c7b"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:4778", "src/backend/utils/adt/selfuncs.c:7054", "src/backend/utils/adt/selfuncs.c:8012"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:4772\u20134786", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, &vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t!vardata.freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:7048\u20137062", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = qinfo->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:8006\u20138020", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}, "11": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/11/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_11_STABLE", "label": "11", "major": "11", "channel": "historical", "revision": "170e416034ec0231d9e9238f2577eeb76ca8d181"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/170e416034ec0231d9e9238f2577eeb76ca8d181/src/include/utils/selfuncs.h#L150", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "05b41241a0d7e6703407878eaf1a9ac5b2ca6387143c217533396f0dd05d41e7"}, {"url": "https://github.com/postgres/postgres/blob/170e416034ec0231d9e9238f2577eeb76ca8d181/src/backend/utils/adt/selfuncs.c#L159", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "8992cb024b68aabbb92e21703fb76efc266c9a79207430b1b7b7f0aaa59d3f18"}, {"url": "https://github.com/postgres/postgres/blob/170e416034ec0231d9e9238f2577eeb76ca8d181/src/backend/utils/adt/selfuncs.c#L4957", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "8992cb024b68aabbb92e21703fb76efc266c9a79207430b1b7b7f0aaa59d3f18"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:4957", "src/backend/utils/adt/selfuncs.c:7484", "src/backend/utils/adt/selfuncs.c:8444"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:4951\u20134965", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, &vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t!vardata.freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:7478\u20137492", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = qinfo->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:8438\u20138452", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}, "12": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/12/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_12_STABLE", "label": "12", "major": "12", "channel": "historical", "revision": "3f302f0ed06f69c5ebd33d4df95895323a3cbef6"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/3f302f0ed06f69c5ebd33d4df95895323a3cbef6/src/include/utils/selfuncs.h#L121", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "4ee9dbdb6d7ce67221901d190471512285646f7514af6e9a9236437ec78189f2"}, {"url": "https://github.com/postgres/postgres/blob/3f302f0ed06f69c5ebd33d4df95895323a3cbef6/src/backend/utils/adt/selfuncs.c#L148", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "4f7a57fc0766f773a26d2ffdc0fb84927cb8908ddce0e54e6cc8c5e36ab85d16"}, {"url": "https://github.com/postgres/postgres/blob/3f302f0ed06f69c5ebd33d4df95895323a3cbef6/src/backend/utils/adt/selfuncs.c#L4659", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "4f7a57fc0766f773a26d2ffdc0fb84927cb8908ddce0e54e6cc8c5e36ab85d16"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:4659", "src/backend/utils/adt/selfuncs.c:6306", "src/backend/utils/adt/selfuncs.c:7237"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:4653\u20134667", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, &vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t!vardata.freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:6300\u20136314", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = iclause->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:7231\u20137245", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}, "13": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/13/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_13_STABLE", "label": "13", "major": "13", "channel": "historical", "revision": "05f6c9ec2c475fae8fdd56ae40bd01afcf70d1f2"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/05f6c9ec2c475fae8fdd56ae40bd01afcf70d1f2/src/include/utils/selfuncs.h#L126", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "035afc988c6f8bc39bf547dcbe12ac6e71aaae677f6673f50cc05cea84c7dfed"}, {"url": "https://github.com/postgres/postgres/blob/05f6c9ec2c475fae8fdd56ae40bd01afcf70d1f2/src/backend/utils/adt/selfuncs.c#L149", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "2d1bdf1b438c6167817fc6126837cb45196fe0c54c93dde18fa814b07d9b9370"}, {"url": "https://github.com/postgres/postgres/blob/05f6c9ec2c475fae8fdd56ae40bd01afcf70d1f2/src/backend/utils/adt/selfuncs.c#L4894", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "2d1bdf1b438c6167817fc6126837cb45196fe0c54c93dde18fa814b07d9b9370"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:4894", "src/backend/utils/adt/selfuncs.c:6629", "src/backend/utils/adt/selfuncs.c:7590"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:4888\u20134902", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, &vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t!vardata.freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:6623\u20136637", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = iclause->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:7584\u20137598", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}, "14": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/14/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_14_STABLE", "label": "14", "major": "14", "channel": "stable", "revision": "fba35c7c28a567839faba867db0808564c0a66db"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/fba35c7c28a567839faba867db0808564c0a66db/src/include/utils/selfuncs.h#L143", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "477ef6ccc43c3148b49e8209b03d40253a7c433e90503633b8ed2faa7215494a"}, {"url": "https://github.com/postgres/postgres/blob/fba35c7c28a567839faba867db0808564c0a66db/src/backend/utils/adt/selfuncs.c#L145", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "c5e40038ae375f6162564473ff69520d53b19144d2aa966099f645967ef28886"}, {"url": "https://github.com/postgres/postgres/blob/fba35c7c28a567839faba867db0808564c0a66db/src/backend/utils/adt/selfuncs.c#L5119", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "c5e40038ae375f6162564473ff69520d53b19144d2aa966099f645967ef28886"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:5119", "src/backend/utils/adt/selfuncs.c:6948", "src/backend/utils/adt/selfuncs.c:7909"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:5113\u20135127", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, &vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t!vardata.freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:6942\u20136956", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = iclause->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:7903\u20137917", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}, "15": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/15/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_15_STABLE", "label": "15", "major": "15", "channel": "stable", "revision": "0351991b8e7c7b64382e2f30ce581a8f276590a6"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/0351991b8e7c7b64382e2f30ce581a8f276590a6/src/include/utils/selfuncs.h#L143", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "1d508219fd05df7deb661e98b5532cefc7017758ed089babeb219b0e5d95cebd"}, {"url": "https://github.com/postgres/postgres/blob/0351991b8e7c7b64382e2f30ce581a8f276590a6/src/backend/utils/adt/selfuncs.c#L145", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "79162c96bde542572b9415b92420897d493befc88f02e955af3090ab1c76af1d"}, {"url": "https://github.com/postgres/postgres/blob/0351991b8e7c7b64382e2f30ce581a8f276590a6/src/backend/utils/adt/selfuncs.c#L5111", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "79162c96bde542572b9415b92420897d493befc88f02e955af3090ab1c76af1d"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:5111", "src/backend/utils/adt/selfuncs.c:6932", "src/backend/utils/adt/selfuncs.c:7893"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:5105\u20135119", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, &vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t!vardata.freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:6926\u20136940", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = iclause->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:7887\u20137901", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}, "16": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/16/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_16_STABLE", "label": "16", "major": "16", "channel": "stable", "revision": "dcc37b7099a9f3cf2c75167d8dc92e75f96bc1fa"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/dcc37b7099a9f3cf2c75167d8dc92e75f96bc1fa/src/include/utils/selfuncs.h#L143", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "1d8250535a2393b146598521d0c131233e174e21c62131ed8b904143f460562e"}, {"url": "https://github.com/postgres/postgres/blob/dcc37b7099a9f3cf2c75167d8dc92e75f96bc1fa/src/backend/utils/adt/selfuncs.c#L148", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "9ac1490ef8751522c48415fb630e7b0a1fc32c23e177e01077adc3364a87ee79"}, {"url": "https://github.com/postgres/postgres/blob/dcc37b7099a9f3cf2c75167d8dc92e75f96bc1fa/src/backend/utils/adt/selfuncs.c#L5149", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "9ac1490ef8751522c48415fb630e7b0a1fc32c23e177e01077adc3364a87ee79"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:5149", "src/backend/utils/adt/selfuncs.c:6977", "src/backend/utils/adt/selfuncs.c:7991"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:5143\u20135157", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, &vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t!vardata.freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:6971\u20136985", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = iclause->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:7985\u20137999", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}, "17": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/17/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_17_STABLE", "label": "17", "major": "17", "channel": "stable", "revision": "163288afd32a448244c8df75b3c33181aadd7f20"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/163288afd32a448244c8df75b3c33181aadd7f20/src/include/utils/selfuncs.h#L146", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "d5e4e27a8f6eb3c1b474e3cc33d4594cdd79c80cf26f184bace66a566f2a0a3b"}, {"url": "https://github.com/postgres/postgres/blob/163288afd32a448244c8df75b3c33181aadd7f20/src/backend/utils/adt/selfuncs.c#L149", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "eff69814693a9b311261a1c9e7b533893baaab52b336d7ac67b2ba822ce1d222"}, {"url": "https://github.com/postgres/postgres/blob/163288afd32a448244c8df75b3c33181aadd7f20/src/backend/utils/adt/selfuncs.c#L5204", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "eff69814693a9b311261a1c9e7b533893baaab52b336d7ac67b2ba822ce1d222"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:5204", "src/backend/utils/adt/selfuncs.c:7153", "src/backend/utils/adt/selfuncs.c:8167"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:5198\u20135212", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, &vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t!vardata.freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:7147\u20137161", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = iclause->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:8161\u20138175", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}, "18": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/18/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_18_STABLE", "label": "18", "major": "18", "channel": "stable", "revision": "753057e340da8f22e57c9a409ea7a235fd6a46bd"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/utils/selfuncs.h#L147", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "a3b64e2dd2d41eab2c162a2571bfbe98fac83ae9fab514b73d637220157a501a"}, {"url": "https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/utils/adt/selfuncs.c#L149", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "c51b0d3f9c9015e98278241c8efc28c39739a56337ffec1163427b3876170f19"}, {"url": "https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/utils/adt/selfuncs.c#L5488", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "c51b0d3f9c9015e98278241c8efc28c39739a56337ffec1163427b3876170f19"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:5488", "src/backend/utils/adt/selfuncs.c:6224", "src/backend/utils/adt/selfuncs.c:8783"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:5482\u20135496", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = indexcol + 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&\n\t\t\t\t!vardata->freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:6218\u20136232", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = iclause->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:8777\u20138791", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}, "19": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"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/utils/selfuncs.h#L154", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "7a49338488273cc2b9f37629eb1efa8304b35536e8b62e56d1ea69972f748d48"}, {"url": "https://github.com/postgres/postgres/blob/b73d13c32c834a2c8e1c60cb92f79530376cedf1/src/backend/utils/adt/selfuncs.c#L184", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "ce307caa3c344424565af0a1b2e19d2639bf56fbe7f73e7803e47f53f099dfcd"}, {"url": "https://github.com/postgres/postgres/blob/b73d13c32c834a2c8e1c60cb92f79530376cedf1/src/backend/utils/adt/selfuncs.c#L5827", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "ce307caa3c344424565af0a1b2e19d2639bf56fbe7f73e7803e47f53f099dfcd"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:5827", "src/backend/utils/adt/selfuncs.c:6563", "src/backend/utils/adt/selfuncs.c:9147"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:5821\u20135835", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = indexcol + 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&\n\t\t\t\t!vardata->freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:6557\u20136571", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = iclause->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:9141\u20139155", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}, "20": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"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/utils/selfuncs.h#L154", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "7a49338488273cc2b9f37629eb1efa8304b35536e8b62e56d1ea69972f748d48"}, {"url": "https://github.com/postgres/postgres/blob/2c10c2ce4d7bcd57543a49ab402af02a39724e0a/src/backend/utils/adt/selfuncs.c#L182", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "e944f9b47bb7ed57677bf10b54c7a0ef3d51c50796c04f31a46a7ac827608d56"}, {"url": "https://github.com/postgres/postgres/blob/2c10c2ce4d7bcd57543a49ab402af02a39724e0a/src/backend/utils/adt/selfuncs.c#L5825", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "e944f9b47bb7ed57677bf10b54c7a0ef3d51c50796c04f31a46a7ac827608d56"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:5825", "src/backend/utils/adt/selfuncs.c:6653", "src/backend/utils/adt/selfuncs.c:9187"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:5819\u20135833", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = indexcol + 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&\n\t\t\t\t!vardata->freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:6647\u20136661", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = iclause->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:9181\u20139195", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}}, "content_hash": "75ec4070d6d5bac73b854afef4a4ff4904e32538dfce309120c0361d4caad41f", "imported_at": "2026-09-27T09:57:58.895"}, "snapshot": {"facts": [{"label": "Interface type", "value": "get_index_stats_hook_type"}, {"label": "Header", "value": "src/include/utils/selfuncs.h"}, {"label": "Subsystem", "value": "Statistics and estimation"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/18/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_18_STABLE", "label": "18", "major": "18", "channel": "stable", "revision": "753057e340da8f22e57c9a409ea7a235fd6a46bd"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/utils/selfuncs.h#L147", "path": "src/include/utils/selfuncs.h", "label": "Interface declaration", "sha256": "a3b64e2dd2d41eab2c162a2571bfbe98fac83ae9fab514b73d637220157a501a"}, {"url": "https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/utils/adt/selfuncs.c#L149", "path": "src/backend/utils/adt/selfuncs.c", "label": "Core definition", "sha256": "c51b0d3f9c9015e98278241c8efc28c39739a56337ffec1163427b3876170f19"}, {"url": "https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/utils/adt/selfuncs.c#L5488", "path": "src/backend/utils/adt/selfuncs.c", "label": "Call sites", "sha256": "c51b0d3f9c9015e98278241c8efc28c39739a56337ffec1163427b3876170f19"}], "sections": [{"title": "Call sites", "paragraphs": ["src/backend/utils/adt/selfuncs.c:5488", "src/backend/utils/adt/selfuncs.c:6224", "src/backend/utils/adt/selfuncs.c:8783"]}, {"code": "\t\t\t\t\t\t * a partial index.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * An index stats hook, however, must make its own\n\t\t\t\t\t\t * decisions about what to do with partial indexes.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (get_index_stats_hook &&\n\t\t\t\t\t\t\t(*get_index_stats_hook) (root, index->indexoid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t pos + 1, vardata))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * The hook took control of acquiring a stats\n\t\t\t\t\t\t\t * tuple.  If it did supply a tuple, it'd better\n\t\t\t\t\t\t\t * have supplied a freefunc.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&", "title": "Core call context: src/backend/utils/adt/selfuncs.c:5482\u20135496", "paragraphs": []}, {"code": "\t{\n\t\t/* Expression --- maybe there are stats for the index itself */\n\t\trelid = index->indexoid;\n\t\tcolnum = indexcol + 1;\n\n\t\tif (get_index_stats_hook &&\n\t\t\t(*get_index_stats_hook) (root, relid, colnum, vardata))\n\t\t{\n\t\t\t/*\n\t\t\t * The hook took control of acquiring a stats tuple.  If it did\n\t\t\t * supply a tuple, it'd better have supplied a freefunc.\n\t\t\t */\n\t\t\tif (HeapTupleIsValid(vardata->statsTuple) &&\n\t\t\t\t!vardata->freefunc)\n\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:6218\u20136232", "paragraphs": []}, {"code": "\t\t\t */\n\n\t\t\t/* get the attnum from the 0-based index. */\n\t\t\tattnum = iclause->indexcol + 1;\n\n\t\t\tif (get_index_stats_hook &&\n\t\t\t\t(*get_index_stats_hook) (root, index->indexoid, attnum, &vardata))\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * The hook took control of acquiring a stats tuple.  If it\n\t\t\t\t * did supply a tuple, it'd better have supplied a freefunc.\n\t\t\t\t */\n\t\t\t\tif (HeapTupleIsValid(vardata.statsTuple) &&\n\t\t\t\t\t!vardata.freefunc)\n\t\t\t\t\telog(ERROR, \"no function provided to release variable stats with\");", "title": "Core call context: src/backend/utils/adt/selfuncs.c:8777\u20138791", "paragraphs": []}], "signature": "typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, Oid indexOid, AttrNumber indexattnum, VariableStatData *vardata);\nextern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;", "description": ["get_index_stats_hook: core extension hook declared in src/include/utils/selfuncs.h. The exact interface and call sites are recorded below."]}, "comparison": {"left": "17", "right": "18", "status": "unchanged", "diff": ""}}