doc-exports/docs/dws/dev/dws_04_0614.html
Lu, Huayi e6fa411af0 DWS DEV 830.201 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-16 07:24:04 +00:00

82 lines
8.0 KiB
HTML

<a name="EN-US_TOPIC_0000001188642114"></a><a name="EN-US_TOPIC_0000001188642114"></a>
<h1 class="topictitle1">PG_REWRITE</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001188642114__a7991c097436d4233bd90d8de55f8fa91"><strong id="EN-US_TOPIC_0000001188642114__b3427158195819">PG_REWRITE</strong> records rewrite rules defined for tables and views.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001188642114__t1422e068c31f49b3a3608c3f12575f72" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PG_REWRITE columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001188642114__r20e73e498c36461493c79831f0fb3e8a"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001188642114__a9044246785f241da876d6045fd24739d"><strong id="EN-US_TOPIC_0000001188642114__b84235270691445">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000001188642114__a7b9cfbb055d94211b8a33589578c1802">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000001188642114__ad46784454f7d44d3a06d5a3ddbc7210d">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001188642114__rbe211ffb66f64aea9e76ac103c16c087"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188642114__a798106a08b3a4326acb2d0b304f8cd7e">rulename</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188642114__a481f9400886043b1a12b06227f5a7ea9">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188642114__afed90fbcccca4217923a32cf3f8cab9d">Name of the rule</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188642114__reab14c7257c84cc2bbcfd41f04919bee"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188642114__aeeb50b61035243c2b2c3eb13c8445242">ev_class</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188642114__a1d1b34ad36b4483d9c2eea3058198abb">oid</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188642114__ae074acd1c9cd4d37abc2df2dd832e7ab">Name of the table that uses the rule</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188642114__r53a3ec2559954e4d9f0e8226c5c9166f"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188642114__a37bc44839d8943aeb3cc4517302bdae1">ev_attr</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188642114__af34c26443c0e4864b3e498fa827a87e8">smallint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188642114__a408b9c48d94c44c6b4db4d07613d02a4">Field to which the rule applies. Currently, the value is <strong id="EN-US_TOPIC_0000001188642114__b1924542910463">0</strong>, indicating the entire table.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188642114__rb12b5aac44894fcdac659dbadd85f87a"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188642114__a8454b44be7654f61b6f841eb735d8a05">ev_type</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188642114__a84b9630eb2e242b4be608ced0d48f38d">"char"</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188642114__ac00d64cede8f4bc19ceffcac663497fd">Event type for this rule:</p>
<ul id="EN-US_TOPIC_0000001188642114__uf620209ceb85446893b84a6ea4463202"><li id="EN-US_TOPIC_0000001188642114__l81b44fa81bc249739d860397c37db63f">1 = SELECT</li><li id="EN-US_TOPIC_0000001188642114__l6482980b0e4f474a8ceeb272583e04c9">2 = UPDATE</li><li id="EN-US_TOPIC_0000001188642114__lc99297097362405ab466e0555e9c7312">3 = INSERT</li><li id="EN-US_TOPIC_0000001188642114__l164501c09eed416183e95ad917b86771">4 = DELETE</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188642114__rb6a0c8c16d0c45b6bcafde27d4a6dd8f"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188642114__afa890e7fe2044a8d80553f4e22db9e52">ev_enabled</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188642114__a356783686f304d58aa5aea55e57234be">"char"</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188642114__a3dfa0821d1034b1bb5133b95d478427f">Controls in which mode the rule fires</p>
<ul id="EN-US_TOPIC_0000001188642114__u0c46994241784f4c8a6c9e1138439327"><li id="EN-US_TOPIC_0000001188642114__l04cb98fcf77446e995a38c7f4945f1d0"><strong id="EN-US_TOPIC_0000001188642114__b48583911642115">O</strong>: The rule fires in "origin" and "local" modes.</li><li id="EN-US_TOPIC_0000001188642114__l0d8b443cf32a43a5aa3e8f8de07cd980"><strong id="EN-US_TOPIC_0000001188642114__b18460134318305">D</strong>: The rule is disabled.</li><li id="EN-US_TOPIC_0000001188642114__lf3d059fab29d44759ebc8cd0d9031937"><strong id="EN-US_TOPIC_0000001188642114__b32441446163016">R</strong>: The rule fires in "replica" mode.</li><li id="EN-US_TOPIC_0000001188642114__lb8be90b445e74bb699ce0863775c5785"><strong id="EN-US_TOPIC_0000001188642114__b1325916496307">A</strong>: The rule always fires.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188642114__rdb5d6b0a64b449f19657a56085907e3e"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188642114__abab5e27910ce4c999c575e6672599b26">is_instead</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188642114__a5fe76db588e94dc8a4a35aa5f0e39a40"><span id="EN-US_TOPIC_0000001188642114__text115092102374">boolean</span></p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188642114__a3f25dcf752bf48e1a6b7293fbeec1c18">Its value is <strong id="EN-US_TOPIC_0000001188642114__b30487863142115">true</strong> if the rule is an <strong id="EN-US_TOPIC_0000001188642114__b36427137742115">INSTEAD</strong> rule.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188642114__r37575edd004f41f9acfeda4494ea3713"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188642114__a4e7bcdf97bbc40a29f9f42f44572cf66">ev_qual</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188642114__a5f7a40b864eb472a837caeb79e2b1941">pg_node_tree</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188642114__acb544d2b23fd487996db435c4bfb7469">Expression tree (in the form of a <strong id="EN-US_TOPIC_0000001188642114__b70761943042115">nodeToString()</strong> representation) for the rule's qualifying condition</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188642114__r0e4a640c3fc34aaa9728f25b38ce5f52"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188642114__a67eb8b9a40ec42b484c6409e2820afa0">ev_action</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188642114__acceadc8f831140f993ef5340e8a22e7e">pg_node_tree</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188642114__ab95481e2f6014eb7b06bc9fc2135beb5">Query tree (in the form of a <strong id="EN-US_TOPIC_0000001188642114__b842352706114740">nodeToString</strong>() representation) for the rule's action</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0561.html">System Catalogs</a></div>
</div>
</div>