{"Entry":{"collection":"hook","key":"explain_get_index_name_hook","name":"explain_get_index_name_hook","aliases":[],"metadata":{"aliases":[],"category":"EXPLAIN","content_hash":"9f8483f7be0937306baed959b217d025ab079f1a059209a860704e52e2670583","imported_at":"2026-09-30T17:44:22.423168+08:00","name":"explain_get_index_name_hook","name_zh":"explain_get_index_name_hook","slug":"explain_get_index_name_hook","summary":"Hook for plugins to get control in explain_get_index_name()"}},"Definition":{"Collection":"hook","Key":"explain_get_index_name_hook","SourceDatabase":"center","Version":"18","SourceTable":"hook","SourceKey":"explain_get_index_name_hook","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","Facts":{"description":["Hook for plugins to get control in explain_get_index_name()"],"facts":[{"label":"Interface type","value":"explain_get_index_name_hook_type"},{"label":"Header","value":"src/include/commands/explain.h"},{"label":"Subsystem","value":"EXPLAIN"},{"label":"Initial value","value":"NULL (no hook installed)"}],"related":[{"label":"EXPLAIN","url":"/wiki/sql/explain/?v=18"}],"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sections":[{"paragraphs":["src/backend/commands/explain.c:4027"],"title":"Call sites"},{"code":"static const char *\nexplain_get_index_name(Oid indexId)\n{\n\tconst char *result;\n\n\tif (explain_get_index_name_hook)\n\t\tresult = (*explain_get_index_name_hook) (indexId);\n\telse\n\t\tresult = NULL;\n\tif (result == NULL)\n\t{\n\t\t/* default behavior: look it up in the catalogs */\n\t\tresult = get_rel_name(indexId);\n\t\tif (result == NULL)\n\t\t\telog(ERROR, \"cache lookup failed for index %u\", indexId);","paragraphs":[],"title":"Core call context: src/backend/commands/explain.c:4021–4035"}],"signature":"typedef const char *(*explain_get_index_name_hook_type) (Oid indexId);\nextern PGDLLIMPORT explain_get_index_name_hook_type explain_get_index_name_hook;","sources":[{"label":"Interface declaration","path":"src/include/commands/explain.h","sha256":"a8ef9548bccebb3c8f5255e8295d1d53dd0e4ea54b6be8b17dfe163ef2918b7f","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/commands/explain.h#L49"},{"label":"Core definition","path":"src/backend/commands/explain.c","sha256":"34c86d6070224a0e981efef51f79101d6d505e5874f1684ace183034bab14bb4","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/commands/explain.c#L53"},{"label":"Call sites","path":"src/backend/commands/explain.c","sha256":"34c86d6070224a0e981efef51f79101d6d505e5874f1684ace183034bab14bb4","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/commands/explain.c#L4027"}]},"ManualEvidence":{"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sources":[{"label":"Interface declaration","path":"src/include/commands/explain.h","sha256":"a8ef9548bccebb3c8f5255e8295d1d53dd0e4ea54b6be8b17dfe163ef2918b7f","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/commands/explain.h#L49"},{"label":"Core definition","path":"src/backend/commands/explain.c","sha256":"34c86d6070224a0e981efef51f79101d6d505e5874f1684ace183034bab14bb4","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/commands/explain.c#L53"},{"label":"Call sites","path":"src/backend/commands/explain.c","sha256":"34c86d6070224a0e981efef51f79101d6d505e5874f1684ace183034bab14bb4","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/commands/explain.c#L4027"}]},"MeasuredEvidence":{}},"Text":{"Collection":"hook","Key":"explain_get_index_name_hook","SourceDatabase":"center","Version":"18","Locale":"en","Title":"explain_get_index_name_hook","Summary":"Hook for plugins to get control in explain_get_index_name()","BodyHTML":"\u003cp\u003eHook for plugins to get control in explain_get_index_name()\u003c/p\u003e","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","ContentHash":"3987d2fe729adcdcb1176608ac45b156993d513328fa23b7306eb0a3fd8dc813","Payload":{"description":["Hook for plugins to get control in explain_get_index_name()"],"related":[{"label":"EXPLAIN","url":"/wiki/sql/explain/?v=18"}],"sections":[{"paragraphs":["src/backend/commands/explain.c:4027"],"title":"Call sites"},{"code":"static const char *\nexplain_get_index_name(Oid indexId)\n{\n\tconst char *result;\n\n\tif (explain_get_index_name_hook)\n\t\tresult = (*explain_get_index_name_hook) (indexId);\n\telse\n\t\tresult = NULL;\n\tif (result == NULL)\n\t{\n\t\t/* default behavior: look it up in the catalogs */\n\t\tresult = get_rel_name(indexId);\n\t\tif (result == NULL)\n\t\t\telog(ERROR, \"cache lookup failed for index %u\", indexId);","paragraphs":[],"title":"Core call context: src/backend/commands/explain.c:4021–4035"}]}},"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}
