{"Entry":{"collection":"catalog","key":"pg_rewrite","name":"pg_rewrite","aliases":[],"metadata":{"changed_in":["8.3","9.1","9.4","12"],"changes":[{"added":["ev_enabled"],"attributes":[],"description_changed":false,"descriptions":[],"from":"8.2","listing":[],"order":false,"removed":[],"status":"changed","to":"8.3","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"The column this rule is for (currently, always zero to indicate the whole table)","name":"ev_attr","to":"The column this rule is for (currently, always -1 to indicate the whole table)"}],"from":"8.3","listing":[],"order":false,"removed":[],"status":"reworded","to":"8.4","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[],"from":"9.0","listing":[],"order":false,"removed":[],"status":"changed","to":"9.1","types":[{"from":"text","name":"ev_action","to":"pg_node_tree"},{"from":"text","name":"ev_qual","to":"pg_node_tree"}],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[],"from":"9.3","listing":[],"order":false,"removed":["ev_attr"],"status":"changed","to":"9.4","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Controls in which session_replication_role modes the rule fires. O = rule fires in \"origin\" and \"local\" modes, D = rule is disabled, R = rule fires in \"replica\" mode, A = rule fires always.","name":"ev_enabled","to":"Controls in which session_replication_role modes the rule fires. O = rule fires in “origin” and “local” modes, D = rule is disabled, R = rule fires in “replica” mode, A = rule fires always."}],"from":"9.6","listing":[],"order":false,"removed":[],"status":"reworded","to":"10","types":[],"unlisted":[]},{"added":[],"attributes":[{"attribute":"not_null","from":false,"name":"ev_action","to":true},{"attribute":"not_null","from":false,"name":"ev_qual","to":true},{"attribute":"hidden","from":true,"name":"oid","to":false}],"description_changed":false,"descriptions":[],"from":"11","listing":[],"order":false,"removed":[],"status":"changed","to":"12","types":[],"unlisted":[]}],"column_count":8,"content_hash":"6a0df71110ff89a966752f2afc66bab12235691f19c1b12e9c9a98137998a541","derived_content_hash":"64bd021ff14b745bd1f0299187fbd1f40eb7a62f47b88bb10c4d64568479a6a7","first_version":"7.4","imported_at":"2026-09-30T00:40:55.764434+08:00","kind":"catalog","last_version":"20","name":"pg_rewrite","position":67,"present_in":["7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"relation_oid":null,"relkind":"r","shared":false,"source_rev":"catalog-bilingual-repair:e7ccb909b3519dbb88e4822ddb088fcf39f96eee4b30d86491e19adcd850d18f","summary":"The catalog pg_rewrite stores rewrite rules for tables and views.","summary_zh":"目录 pg_rewrite 存储表和视图的重写规则。"}},"Definition":{"Collection":"catalog","Key":"pg_rewrite","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_rewrite","SourceRevision":"catalog-bilingual-repair:e7ccb909b3519dbb88e4822ddb088fcf39f96eee4b30d86491e19adcd850d18f","Facts":{"columns":[{"array_dimensions":0,"attnum":1,"description":"Row identifier","description_zh":"行标识符","documented":true,"documented_name":"oid","hidden":false,"name":"oid","not_null":true,"references":"","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":2,"description":"Rule name","description_zh":"规则名称","documented":true,"documented_name":"rulename","hidden":false,"name":"rulename","not_null":true,"references":"","type":"name","type_modifier":-1,"type_oid":19,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":3,"description":"The table this rule is for","description_zh":"使用该规则的表","documented":true,"documented_name":"ev_class","hidden":false,"name":"ev_class","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":4,"description":"Event type that the rule is for: 1 = SELECT, 2 = UPDATE, 3 = INSERT, 4 = DELETE","description_zh":"使用该规则的事件类型：1 = SELECT，2 = UPDATE，3 = INSERT，4 = DELETE","documented":true,"documented_name":"ev_type","hidden":false,"name":"ev_type","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":5,"description":"Controls in which session_replication_role modes the rule fires. O = rule fires in “origin” and “local” modes, D = rule is disabled, R = rule fires in “replica” mode, A = rule fires always.","description_zh":"控制在哪种 session_replication_role 模式中触发该规则。O = 规则在“origin”和“local”模式触发，D = 规则被禁用，R = 规则在“replica”模式触发，A = 规则总是被触发。","documented":true,"documented_name":"ev_enabled","hidden":false,"name":"ev_enabled","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":6,"description":"True if the rule is an INSTEAD rule","description_zh":"为真表示是一个 INSTEAD 规则","documented":true,"documented_name":"is_instead","hidden":false,"name":"is_instead","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":7,"description":"Expression tree (in the form of a nodeToString() representation) for the rule's qualifying condition","description_zh":"规则条件的表达式树（以 nodeToString() 表示）","documented":true,"documented_name":"ev_qual","hidden":false,"name":"ev_qual","not_null":true,"references":"","type":"pg_node_tree","type_modifier":-1,"type_oid":194,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":8,"description":"Query tree (in the form of a nodeToString() representation) for the rule's action","description_zh":"规则动作的查询树（以 nodeToString() 表示）","documented":true,"documented_name":"ev_action","hidden":false,"name":"ev_action","not_null":true,"references":"","type":"pg_node_tree","type_modifier":-1,"type_oid":194,"zh_from":"same-version-manual"}],"description":"The catalog pg_rewrite stores rewrite rules for tables and views.","description_zh":"目录 pg_rewrite 存储表和视图的重写规则。","description_zh_html":"\u003cp\u003e目录 pg_rewrite 存储表和视图的重写规则。\u003c/p\u003e","doc":{"anchor":"id-1.10.4.47.4","file":"catalog-pg-rewrite.html","lang":"en","sha256":"85ab76af963975aeefe957ba7f94b52e8ec8e4fb78cce7948ba6d1c1dc4031c0","slug":"18"},"kind":"catalog","lang":"en","measured_attributes":true,"metadata_release":"18.6","runtime_columns":["oid","rulename","ev_class","ev_type","ev_enabled","is_instead","ev_qual","ev_action"],"runtime_verified":false,"source":"english-manual","sources":[{"evidence":[{"build_id":107,"kind":"same-version-manual","locale":"zh-Hans","page":"catalog-pg-rewrite.html","sha256":"99bfba21bc0cd714e824b6aa99e72e77d5da6b9e7843c13ad28ab8cdffb9638e","source_revision":"unknown:rendered-translation-baseline","translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","version":"18"}],"kind":"catalog-bilingual-repair","prior_source_revision":"english-manuals:bdb691c62f5b37d6bd4a7015ee58b05e34120274f112bce47ae7264801d2c9a2","version":"18"}],"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"id-1.10.4.47.4","file":"catalog-pg-rewrite.html","lang":"en","sha256":"85ab76af963975aeefe957ba7f94b52e8ec8e4fb78cce7948ba6d1c1dc4031c0","slug":"18"},"sources":[{"evidence":[{"build_id":107,"kind":"same-version-manual","locale":"zh-Hans","page":"catalog-pg-rewrite.html","sha256":"99bfba21bc0cd714e824b6aa99e72e77d5da6b9e7843c13ad28ab8cdffb9638e","source_revision":"unknown:rendered-translation-baseline","translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","version":"18"}],"kind":"catalog-bilingual-repair","prior_source_revision":"english-manuals:bdb691c62f5b37d6bd4a7015ee58b05e34120274f112bce47ae7264801d2c9a2","version":"18"}]},"MeasuredEvidence":{"measured_attributes":true,"metadata_release":"18.6","runtime_columns":["oid","rulename","ev_class","ev_type","ev_enabled","is_instead","ev_qual","ev_action"],"runtime_verified":false}},"Text":{"Collection":"catalog","Key":"pg_rewrite","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_rewrite","Summary":"The catalog pg_rewrite stores rewrite rules for tables and views.","BodyHTML":"\u003cp\u003eThe catalog pg_rewrite stores rewrite rules for tables and views.\u003c/p\u003e","SourceRevision":"catalog-bilingual-repair:e7ccb909b3519dbb88e4822ddb088fcf39f96eee4b30d86491e19adcd850d18f","ContentHash":"b32fb487b349d1da8f0b6d88ca340dce022b28f78508abf995ce6f75c69a6217","Payload":{"columns":[{"array_dimensions":0,"attnum":1,"description":"Row identifier","description_zh":"行标识符","documented":true,"documented_name":"oid","hidden":false,"name":"oid","not_null":true,"references":"","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":2,"description":"Rule name","description_zh":"规则名称","documented":true,"documented_name":"rulename","hidden":false,"name":"rulename","not_null":true,"references":"","type":"name","type_modifier":-1,"type_oid":19,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":3,"description":"The table this rule is for","description_zh":"使用该规则的表","documented":true,"documented_name":"ev_class","hidden":false,"name":"ev_class","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":4,"description":"Event type that the rule is for: 1 = SELECT, 2 = UPDATE, 3 = INSERT, 4 = DELETE","description_zh":"使用该规则的事件类型：1 = SELECT，2 = UPDATE，3 = INSERT，4 = DELETE","documented":true,"documented_name":"ev_type","hidden":false,"name":"ev_type","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":5,"description":"Controls in which session_replication_role modes the rule fires. O = rule fires in “origin” and “local” modes, D = rule is disabled, R = rule fires in “replica” mode, A = rule fires always.","description_zh":"控制在哪种 session_replication_role 模式中触发该规则。O = 规则在“origin”和“local”模式触发，D = 规则被禁用，R = 规则在“replica”模式触发，A = 规则总是被触发。","documented":true,"documented_name":"ev_enabled","hidden":false,"name":"ev_enabled","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":6,"description":"True if the rule is an INSTEAD rule","description_zh":"为真表示是一个 INSTEAD 规则","documented":true,"documented_name":"is_instead","hidden":false,"name":"is_instead","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":7,"description":"Expression tree (in the form of a nodeToString() representation) for the rule's qualifying condition","description_zh":"规则条件的表达式树（以 nodeToString() 表示）","documented":true,"documented_name":"ev_qual","hidden":false,"name":"ev_qual","not_null":true,"references":"","type":"pg_node_tree","type_modifier":-1,"type_oid":194,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":8,"description":"Query tree (in the form of a nodeToString() representation) for the rule's action","description_zh":"规则动作的查询树（以 nodeToString() 表示）","documented":true,"documented_name":"ev_action","hidden":false,"name":"ev_action","not_null":true,"references":"","type":"pg_node_tree","type_modifier":-1,"type_oid":194,"zh_from":"same-version-manual"}],"description":"The catalog pg_rewrite stores rewrite rules for tables and views."}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
