{"Entry":{"collection":"hook","key":"row_security_policy_hook_restrictive","name":"row_security_policy_hook_restrictive","aliases":[],"metadata":{"aliases":[],"category":"Permissions and object access","content_hash":"424f5f135da3a4fcdcf6fbe6cad4fbb1020ef6ffe30bbaa0d32de98ac4e054c1","derived_content_hash":"a41de6ad83b280d8addc2fed722074c1ca69be454402e720ffd528364c4d2ee0","imported_at":"2026-09-27T17:57:58.859278+08:00","name":"row_security_policy_hook_restrictive","name_zh":"row_security_policy_hook_restrictive","repair_provenance":{"original_source_revision":"","receipt_sha256":"1a9276568dfe90973ec9f9a5c43fa8bc297c13b527d60da93e975f0657354b6b","repair":"wiki-repair-20261023"},"slug":"row_security_policy_hook_restrictive","source_rev":"wiki-repair-20261023:21a82142dcc4739a79b6bd7212ac38f6d28a62c3f26ec7206d85542d15f6604f","summary":"row_security_policy_hook_restrictive: core extension hook declared in src/include/rewrite/rowsecurity.h. The exact interface and call sites are recorded below."}},"Definition":{"Collection":"hook","Key":"row_security_policy_hook_restrictive","SourceDatabase":"center","Version":"18","SourceTable":"hook","SourceKey":"row_security_policy_hook_restrictive","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","Facts":{"description":["row_security_policy_hook_restrictive: core extension hook declared in src/include/rewrite/rowsecurity.h. The exact interface and call sites are recorded below."],"description_zh":"row_security_policy_hook_restrictive 是在 src/include/rewrite/rowsecurity.h 中声明的核心扩展钩子。下方保留精确接口与调用位置。","description_zh_html":"\u003cp\u003erow_security_policy_hook_restrictive 是在 src/include/rewrite/rowsecurity.h 中声明的核心扩展钩子。下方保留精确接口与调用位置。\u003c/p\u003e\u003cp\u003e以下中文为本站依据所列 PostgreSQL 源码注释编译的说明。\u003c/p\u003e\u003ch3\u003e接口声明\u003c/h3\u003e\u003cpre\u003etypedef List *(*row_security_policy_hook_type) (CmdType cmdtype, Relation relation);\nextern PGDLLIMPORT row_security_policy_hook_type row_security_policy_hook_restrictive;\u003c/pre\u003e\u003ch3\u003e调用位置\u003c/h3\u003e\u003cul\u003e\u003cli\u003e\u003ccode\u003esrc/backend/rewrite/rowsecurity.c:622\u003c/code\u003e\u003c/li\u003e\u003c/ul\u003e\u003ch3\u003e核心调用上下文：src/backend/rewrite/rowsecurity.c:616–630\u003c/h3\u003e\u003cpre\u003e\t * These are simply appended to the lists of internal policies, if they\n\t * apply to the specified role.\n\t */\n\tif (row_security_policy_hook_restrictive)\n\t{\n\t\tList\t   *hook_policies =\n\t\t\t(*row_security_policy_hook_restrictive) (cmd, relation);\n\n\t\t/*\n\t\t * As with built-in restrictive policies, we sort any hook-provided\n\t\t * restrictive policies by name also.  Note that we also intentionally\n\t\t * always check all built-in restrictive policies, in name order,\n\t\t * before checking restrictive policies added by hooks, in name order.\n\t\t */\n\t\tsort_policies_by_name(hook_policies);\u003c/pre\u003e","facts":[{"label":"Interface type","value":"row_security_policy_hook_type"},{"label":"Header","value":"src/include/rewrite/rowsecurity.h"},{"label":"Subsystem","value":"Permissions and object access"},{"label":"Initial value","value":"NULL (no hook installed)"}],"related":[{"label":"Row Security Policies","url":"/docs/18/ddl-rowsecurity.html"}],"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sections":[{"paragraphs":["src/backend/rewrite/rowsecurity.c:622"],"title":"Call sites"},{"code":"\t * These are simply appended to the lists of internal policies, if they\n\t * apply to the specified role.\n\t */\n\tif (row_security_policy_hook_restrictive)\n\t{\n\t\tList\t   *hook_policies =\n\t\t\t(*row_security_policy_hook_restrictive) (cmd, relation);\n\n\t\t/*\n\t\t * As with built-in restrictive policies, we sort any hook-provided\n\t\t * restrictive policies by name also.  Note that we also intentionally\n\t\t * always check all built-in restrictive policies, in name order,\n\t\t * before checking restrictive policies added by hooks, in name order.\n\t\t */\n\t\tsort_policies_by_name(hook_policies);","paragraphs":[],"title":"Core call context: src/backend/rewrite/rowsecurity.c:616–630"}],"signature":"typedef List *(*row_security_policy_hook_type) (CmdType cmdtype, Relation relation);\nextern PGDLLIMPORT row_security_policy_hook_type row_security_policy_hook_restrictive;","sources":[{"label":"Interface declaration","path":"src/include/rewrite/rowsecurity.h","sha256":"3b195aed12c4378146a3e74d7873676f6e7e80f18f4fe9ef6bc125ef2f9cea24","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/rewrite/rowsecurity.h#L37"},{"label":"Core definition","path":"src/backend/rewrite/rowsecurity.c","sha256":"dca1d39120cb8f5cca60caf1264de7c3b5ce6f30c1a17ce1d5a42da0be6cf75c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/rewrite/rowsecurity.c#L87"},{"label":"Call sites","path":"src/backend/rewrite/rowsecurity.c","sha256":"dca1d39120cb8f5cca60caf1264de7c3b5ce6f30c1a17ce1d5a42da0be6cf75c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/rewrite/rowsecurity.c#L622"}],"translation_provenance":{"inputs":[{"label":"Interface declaration","path":"src/include/rewrite/rowsecurity.h","sha256":"3b195aed12c4378146a3e74d7873676f6e7e80f18f4fe9ef6bc125ef2f9cea24","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/rewrite/rowsecurity.h#L37"},{"label":"Core definition","path":"src/backend/rewrite/rowsecurity.c","sha256":"dca1d39120cb8f5cca60caf1264de7c3b5ce6f30c1a17ce1d5a42da0be6cf75c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/rewrite/rowsecurity.c#L87"},{"label":"Call sites","path":"src/backend/rewrite/rowsecurity.c","sha256":"dca1d39120cb8f5cca60caf1264de7c3b5ce6f30c1a17ce1d5a42da0be6cf75c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/rewrite/rowsecurity.c#L622"}],"kind":"authored-source-translation","locale":"zh-Hans","source_revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","translated_source_sha256":"ed9a4bd7b9c40ef6274cc4be8b6b08dbd82803a4c9d18f67164ed77a0e1da505","version":"18"},"zh_from":"authored-source-translation"},"ManualEvidence":{"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sources":[{"label":"Interface declaration","path":"src/include/rewrite/rowsecurity.h","sha256":"3b195aed12c4378146a3e74d7873676f6e7e80f18f4fe9ef6bc125ef2f9cea24","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/rewrite/rowsecurity.h#L37"},{"label":"Core definition","path":"src/backend/rewrite/rowsecurity.c","sha256":"dca1d39120cb8f5cca60caf1264de7c3b5ce6f30c1a17ce1d5a42da0be6cf75c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/rewrite/rowsecurity.c#L87"},{"label":"Call sites","path":"src/backend/rewrite/rowsecurity.c","sha256":"dca1d39120cb8f5cca60caf1264de7c3b5ce6f30c1a17ce1d5a42da0be6cf75c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/rewrite/rowsecurity.c#L622"}]},"MeasuredEvidence":{}},"Text":{"Collection":"hook","Key":"row_security_policy_hook_restrictive","SourceDatabase":"center","Version":"18","Locale":"en","Title":"row_security_policy_hook_restrictive","Summary":"row_security_policy_hook_restrictive: core extension hook declared in src/include/rewrite/rowsecurity.h. The exact interface and call sites are recorded below.","BodyHTML":"\u003cp\u003erow_security_policy_hook_restrictive: core extension hook declared in src/include/rewrite/rowsecurity.h. The exact interface and call sites are recorded below.\u003c/p\u003e","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","ContentHash":"a45641b5402357f00fa989103e27bad6a8cc8d8d3e275a3ff6b54a697500d32b","Payload":{"description":["row_security_policy_hook_restrictive: core extension hook declared in src/include/rewrite/rowsecurity.h. The exact interface and call sites are recorded below."],"related":[{"label":"Row Security Policies","url":"/docs/18/ddl-rowsecurity.html"}],"sections":[{"paragraphs":["src/backend/rewrite/rowsecurity.c:622"],"title":"Call sites"},{"code":"\t * These are simply appended to the lists of internal policies, if they\n\t * apply to the specified role.\n\t */\n\tif (row_security_policy_hook_restrictive)\n\t{\n\t\tList\t   *hook_policies =\n\t\t\t(*row_security_policy_hook_restrictive) (cmd, relation);\n\n\t\t/*\n\t\t * As with built-in restrictive policies, we sort any hook-provided\n\t\t * restrictive policies by name also.  Note that we also intentionally\n\t\t * always check all built-in restrictive policies, in name order,\n\t\t * before checking restrictive policies added by hooks, in name order.\n\t\t */\n\t\tsort_policies_by_name(hook_policies);","paragraphs":[],"title":"Core call context: src/backend/rewrite/rowsecurity.c:616–630"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
