{"Entry":{"collection":"catalog","key":"pg_policies","name":"pg_policies","aliases":[],"metadata":{"changed_in":["10"],"changes":[{"added":[],"attributes":[],"description_changed":false,"descriptions":[],"from":"9.4","order":false,"removed":[],"status":"added","to":"9.5","types":[]},{"added":["permissive"],"attributes":[],"description_changed":false,"descriptions":[],"from":"9.6","listing":["polpermissive"],"order":false,"removed":[],"status":"changed","to":"10","types":[],"unlisted":["permissive"]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[],"from":"12","listing":["permissive","polpermissive"],"order":false,"removed":[],"status":"reworded","to":"13","types":[],"unlisted":[]}],"column_count":8,"content_hash":"5acd39a87fe3a3eae69a6785b1dda5a8bb488b9abd1c5dcf1c0a6cb6c9de172b","first_version":"9.5","imported_at":"2026-09-30T00:40:55.677755+08:00","kind":"view","last_version":"20","name":"pg_policies","position":53,"present_in":["9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"relation_oid":null,"relkind":"v","shared":false,"source_rev":"english-manuals:2ec65f96c8b36c21e4d11a26186a100a8ec4ae2d2745370140160f2db33af706","summary":"The view pg_policies provides access to useful information about each row-level security policy in the database.","summary_zh":""}},"Definition":{"Collection":"catalog","Key":"pg_policies","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_policies","SourceRevision":"english-manuals:2ec65f96c8b36c21e4d11a26186a100a8ec4ae2d2745370140160f2db33af706","Facts":{"columns":[{"array_dimensions":0,"attnum":1,"description":"Name of schema containing table policy is on","description_zh":"","documented":true,"documented_name":"schemaname","hidden":false,"name":"schemaname","not_null":false,"references":"pg_namespace.nspname","type":"name","type_modifier":-1,"type_oid":19},{"array_dimensions":0,"attnum":2,"description":"Name of table policy is on","description_zh":"","documented":true,"documented_name":"tablename","hidden":false,"name":"tablename","not_null":false,"references":"pg_class.relname","type":"name","type_modifier":-1,"type_oid":19},{"array_dimensions":0,"attnum":3,"description":"Name of policy","description_zh":"","documented":true,"documented_name":"policyname","hidden":false,"name":"policyname","not_null":false,"references":"pg_policy.polname","type":"name","type_modifier":-1,"type_oid":19},{"array_dimensions":0,"attnum":4,"description":"Is the policy permissive or restrictive?","description_zh":"","documented":true,"documented_name":"permissive","hidden":false,"name":"permissive","not_null":false,"references":"","type":"text","type_modifier":-1,"type_oid":25},{"array_dimensions":0,"attnum":5,"description":"The roles to which this policy applies","description_zh":"","documented":true,"documented_name":"roles","hidden":false,"name":"roles","not_null":false,"references":"","type":"name[]","type_modifier":-1,"type_oid":1003},{"array_dimensions":0,"attnum":6,"description":"The command type to which the policy is applied","description_zh":"","documented":true,"documented_name":"cmd","hidden":false,"name":"cmd","not_null":false,"references":"","type":"text","type_modifier":-1,"type_oid":25},{"array_dimensions":0,"attnum":7,"description":"The expression added to the security barrier qualifications for queries that this policy applies to","description_zh":"","documented":true,"documented_name":"qual","hidden":false,"name":"qual","not_null":false,"references":"","type":"text","type_modifier":-1,"type_oid":25},{"array_dimensions":0,"attnum":8,"description":"The expression added to the WITH CHECK qualifications for queries that attempt to add rows to this table","description_zh":"","documented":true,"documented_name":"with_check","hidden":false,"name":"with_check","not_null":false,"references":"","type":"text","type_modifier":-1,"type_oid":25}],"description":"The view pg_policies provides access to useful information about each row-level security policy in the database.","description_zh":"","doc":{"anchor":"id-1.10.5.19.4","file":"view-pg-policies.html","lang":"en","sha256":"17fdf08337ef3efb6e7143daa1b511674e74c46229c912a8ba11fed634e127ea","slug":"18"},"kind":"view","lang":"en","measured_attributes":true,"metadata_release":"18.6","runtime_columns":["schemaname","tablename","policyname","permissive","roles","cmd","qual","with_check"],"runtime_verified":false,"source":"english-manual"},"ManualEvidence":{"doc":{"anchor":"id-1.10.5.19.4","file":"view-pg-policies.html","lang":"en","sha256":"17fdf08337ef3efb6e7143daa1b511674e74c46229c912a8ba11fed634e127ea","slug":"18"}},"MeasuredEvidence":{"measured_attributes":true,"metadata_release":"18.6","runtime_columns":["schemaname","tablename","policyname","permissive","roles","cmd","qual","with_check"],"runtime_verified":false}},"Text":{"Collection":"catalog","Key":"pg_policies","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_policies","Summary":"视图pg_policies提供了有关数据库中每个行级安全策略的有用信息。","BodyHTML":"\u003cp\u003e视图pg_policies提供了有关数据库中每个行级安全策略的有用信息。\u003c/p\u003e","SourceRevision":"2026-09-27@419045e","ContentHash":"13ca0a5f5ab6d8b7d3e5db4a5b1618c8ac8ef2c3a8b4f18b7fe4447d5e072a98","Payload":{"columns":[{"description_zh":"包含策略所在表的模式的名称","name":"schemaname","type":"name","zh_from":"doc"},{"description_zh":"策略所在表的名称","name":"tablename","type":"name","zh_from":"doc"},{"description_zh":"策略名称","name":"policyname","type":"name","zh_from":"doc"},{"description_zh":"策略是宽松的还是限制性的？","name":"permissive","type":"text","zh_from":"doc"},{"description_zh":"这个策略适用的角色","name":"roles","type":"name[]","zh_from":"doc"},{"description_zh":"这个策略适用的命令类型","name":"cmd","type":"text","zh_from":"doc"},{"description_zh":"作为这个策略适用的查询的安全屏障条件增加的表达式","name":"qual","type":"text","zh_from":"doc"},{"description_zh":"作为尝试向该表增加行的查询的 WITH CHECK 条件增加的表达式","name":"with_check","type":"text","zh_from":"doc"}],"description_zh":"视图pg_policies提供了有关数据库中每个行级安全策略的有用信息。","zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
