{"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":"aea7cfe2f8718298989d2b580f6c85b1f50b4b05005155db575150c752aafa64","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":"english-manuals:bdb691c62f5b37d6bd4a7015ee58b05e34120274f112bce47ae7264801d2c9a2","summary":"The catalog pg_rewrite stores rewrite rules for tables and views.","summary_zh":""}},"Definition":{"Collection":"catalog","Key":"pg_rewrite","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_rewrite","SourceRevision":"english-manuals:bdb691c62f5b37d6bd4a7015ee58b05e34120274f112bce47ae7264801d2c9a2","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},{"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},{"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},{"array_dimensions":0,"attnum":4,"description":"Event type that the rule is for: 1 = SELECT, 2 = UPDATE, 3 = INSERT, 4 = DELETE","description_zh":"","documented":true,"documented_name":"ev_type","hidden":false,"name":"ev_type","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18},{"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":"","documented":true,"documented_name":"ev_enabled","hidden":false,"name":"ev_enabled","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18},{"array_dimensions":0,"attnum":6,"description":"True if the rule is an INSTEAD rule","description_zh":"","documented":true,"documented_name":"is_instead","hidden":false,"name":"is_instead","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16},{"array_dimensions":0,"attnum":7,"description":"Expression tree (in the form of a nodeToString() representation) for the rule's qualifying condition","description_zh":"","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},{"array_dimensions":0,"attnum":8,"description":"Query tree (in the form of a nodeToString() representation) for the rule's action","description_zh":"","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}],"description":"The catalog pg_rewrite stores rewrite rules for tables and views.","description_zh":"","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"},"ManualEvidence":{"doc":{"anchor":"id-1.10.4.47.4","file":"catalog-pg-rewrite.html","lang":"en","sha256":"85ab76af963975aeefe957ba7f94b52e8ec8e4fb78cce7948ba6d1c1dc4031c0","slug":"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":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_rewrite","Summary":"目录pg_rewrite存储表和视图的重写规则。","BodyHTML":"\u003cp\u003e目录pg_rewrite存储表和视图的重写规则。\u003c/p\u003e","SourceRevision":"2026-09-27@419045e","ContentHash":"299fd028c1d329af2cc0003ba37a19956a2cb01c6e961d2680d5bb057e6286e1","Payload":{"columns":[{"description_zh":"行标识符","name":"oid","type":"oid","zh_from":"doc"},{"description_zh":"规则名称","name":"rulename","type":"name","zh_from":"doc"},{"description_zh":"使用该规则的表","name":"ev_class","type":"oid","zh_from":"doc"},{"description_zh":"使用该规则的事件类型：1 = SELECT，2 = UPDATE，3 = INSERT，4 = DELETE","name":"ev_type","type":"\"char\"","zh_from":"doc"},{"description_zh":"控制在哪种session_replication_role模式中触发该规则。O = 规则在“origin”和“local”模式触发，D = 规则被禁用，R = 规则在“replica”模式触发，A = 规则总是被触发。","name":"ev_enabled","type":"\"char\"","zh_from":"doc"},{"description_zh":"为真表示是一个INSTEAD规则","name":"is_instead","type":"boolean","zh_from":"doc"},{"description_zh":"规则条件的表达式树（以 nodeToString() 表示）","name":"ev_qual","type":"pg_node_tree","zh_from":"doc"},{"description_zh":"规则动作的查询树（以 nodeToString() 表示）","name":"ev_action","type":"pg_node_tree","zh_from":"doc"}],"description_zh":"目录pg_rewrite存储表和视图的重写规则。","zh_from":"doc"}},"RequestedLocale":"zh-Hans","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}
