{"Entry":{"collection":"hook","key":"row_security_policy_hook_permissive","name":"row_security_policy_hook_permissive","aliases":[],"metadata":{"aliases":[],"category":"Permissions and object access","content_hash":"ef26807d10f253e7fc7572a7ab90ae1298136995c999cb90c00169759f9ecb55","imported_at":"2026-09-27T17:57:58.857424+08:00","name":"row_security_policy_hook_permissive","name_zh":"row_security_policy_hook_permissive","slug":"row_security_policy_hook_permissive","summary":"hooks to allow extensions to add their own security policies row_security_policy_hook_permissive can be used to add policies which are combined with the other permissive policies, using OR. row_security_policy_hook_restrictive can be used to add policies which are enforced, regardless of other policies (they are combined using AND)."}},"Definition":{"Collection":"hook","Key":"row_security_policy_hook_permissive","SourceDatabase":"center","Version":"18","SourceTable":"hook","SourceKey":"row_security_policy_hook_permissive","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","Facts":{"description":["hooks to allow extensions to add their own security policies row_security_policy_hook_permissive can be used to add policies which are combined with the other permissive policies, using OR. row_security_policy_hook_restrictive can be used to add policies which are enforced, regardless of other policies (they are combined using AND)."],"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:644"],"title":"Call sites"},{"code":"\t\t}\n\t}\n\n\tif (row_security_policy_hook_permissive)\n\t{\n\t\tList\t   *hook_policies =\n\t\t\t(*row_security_policy_hook_permissive) (cmd, relation);\n\n\t\tforeach(item, hook_policies)\n\t\t{\n\t\t\tRowSecurityPolicy *policy = (RowSecurityPolicy *) lfirst(item);\n\n\t\t\tif (check_role_for_policy(policy-\u003eroles, user_id))\n\t\t\t\t*permissive_policies = lappend(*permissive_policies, policy);\n\t\t}","paragraphs":[],"title":"Core call context: src/backend/rewrite/rowsecurity.c:638–652"}],"signature":"typedef List *(*row_security_policy_hook_type) (CmdType cmdtype, Relation relation);\nextern PGDLLIMPORT row_security_policy_hook_type row_security_policy_hook_permissive;","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#L86"},{"label":"Call sites","path":"src/backend/rewrite/rowsecurity.c","sha256":"dca1d39120cb8f5cca60caf1264de7c3b5ce6f30c1a17ce1d5a42da0be6cf75c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/rewrite/rowsecurity.c#L644"}]},"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#L86"},{"label":"Call sites","path":"src/backend/rewrite/rowsecurity.c","sha256":"dca1d39120cb8f5cca60caf1264de7c3b5ce6f30c1a17ce1d5a42da0be6cf75c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/rewrite/rowsecurity.c#L644"}]},"MeasuredEvidence":{}},"Text":{"Collection":"hook","Key":"row_security_policy_hook_permissive","SourceDatabase":"center","Version":"18","Locale":"en","Title":"row_security_policy_hook_permissive","Summary":"hooks to allow extensions to add their own security policies row_security_policy_hook_permissive can be used to add policies which are combined with the other permissive policies, using OR. row_security_policy_hook_restrictive can be used to add policies which are enforced, regardless of other policies (they are combined using AND).","BodyHTML":"\u003cp\u003ehooks to allow extensions to add their own security policies row_security_policy_hook_permissive can be used to add policies which are combined with the other permissive policies, using OR. row_security_policy_hook_restrictive can be used to add policies which are enforced, regardless of other policies (they are combined using AND).\u003c/p\u003e","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","ContentHash":"7d594276c434a8e278ee54f60c9494a1fe38d8ef90d8c7b7bbe82f6aaddcda51","Payload":{"description":["hooks to allow extensions to add their own security policies row_security_policy_hook_permissive can be used to add policies which are combined with the other permissive policies, using OR. row_security_policy_hook_restrictive can be used to add policies which are enforced, regardless of other policies (they are combined using AND)."],"related":[{"label":"Row Security Policies","url":"/docs/18/ddl-rowsecurity.html"}],"sections":[{"paragraphs":["src/backend/rewrite/rowsecurity.c:644"],"title":"Call sites"},{"code":"\t\t}\n\t}\n\n\tif (row_security_policy_hook_permissive)\n\t{\n\t\tList\t   *hook_policies =\n\t\t\t(*row_security_policy_hook_permissive) (cmd, relation);\n\n\t\tforeach(item, hook_policies)\n\t\t{\n\t\t\tRowSecurityPolicy *policy = (RowSecurityPolicy *) lfirst(item);\n\n\t\t\tif (check_role_for_policy(policy-\u003eroles, user_id))\n\t\t\t\t*permissive_policies = lappend(*permissive_policies, policy);\n\t\t}","paragraphs":[],"title":"Core call context: src/backend/rewrite/rowsecurity.c:638–652"}]}},"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}
