Files
doc-exports/docs/dws/dev/dws_04_0614.html
luhuayi 177cd61a57 DWS DEVG 910.211 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: luhuayi <luhuayi@huawei.com>
Co-committed-by: luhuayi <luhuayi@huawei.com>
2025-05-05 07:44:03 +00:00

89 lines
8.9 KiB
HTML

<a name="EN-US_TOPIC_0000001811610177"></a><a name="EN-US_TOPIC_0000001811610177"></a>
<h1 class="topictitle1">PG_REWRITE</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001811610177__a7991c097436d4233bd90d8de55f8fa91"><strong id="EN-US_TOPIC_0000001811610177__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_0000001811610177__t1422e068c31f49b3a3608c3f12575f72" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PG_REWRITE columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001811610177__r20e73e498c36461493c79831f0fb3e8a"><th align="left" class="cellrowborder" valign="top" width="25.77%" id="mcps1.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001811610177__a9044246785f241da876d6045fd24739d"><strong id="EN-US_TOPIC_0000001811610177__b6883803643446">Column</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.73%" id="mcps1.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000001811610177__a7b9cfbb055d94211b8a33589578c1802">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.49999999999999%" id="mcps1.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000001811610177__ad46784454f7d44d3a06d5a3ddbc7210d">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001811610177__rbe211ffb66f64aea9e76ac103c16c087"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001811610177__a798106a08b3a4326acb2d0b304f8cd7e">rulename</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001811610177__a481f9400886043b1a12b06227f5a7ea9">Name</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001811610177__afed90fbcccca4217923a32cf3f8cab9d">Name of the rule</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001811610177__reab14c7257c84cc2bbcfd41f04919bee"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001811610177__aeeb50b61035243c2b2c3eb13c8445242">ev_class</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001811610177__a1d1b34ad36b4483d9c2eea3058198abb">OID</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001811610177__ae074acd1c9cd4d37abc2df2dd832e7ab">Name of the table that uses the rule</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001811610177__r53a3ec2559954e4d9f0e8226c5c9166f"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001811610177__a37bc44839d8943aeb3cc4517302bdae1">ev_attr</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001811610177__af34c26443c0e4864b3e498fa827a87e8">Smallint</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001811610177__a408b9c48d94c44c6b4db4d07613d02a4">Column this rule is for (always <strong id="EN-US_TOPIC_0000001811610177__b5973241652638">0</strong> to indicate the entire table)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001811610177__rb12b5aac44894fcdac659dbadd85f87a"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001811610177__a8454b44be7654f61b6f841eb735d8a05">ev_type</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001811610177__a84b9630eb2e242b4be608ced0d48f38d">Char</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001811610177__ac00d64cede8f4bc19ceffcac663497fd">Event type for this rule:</p>
<ul id="EN-US_TOPIC_0000001811610177__uf620209ceb85446893b84a6ea4463202"><li id="EN-US_TOPIC_0000001811610177__l81b44fa81bc249739d860397c37db63f">1 = SELECT</li><li id="EN-US_TOPIC_0000001811610177__l6482980b0e4f474a8ceeb272583e04c9">2 = UPDATE</li><li id="EN-US_TOPIC_0000001811610177__lc99297097362405ab466e0555e9c7312">3 = INSERT</li><li id="EN-US_TOPIC_0000001811610177__l164501c09eed416183e95ad917b86771">4 = DELETE</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001811610177__rb6a0c8c16d0c45b6bcafde27d4a6dd8f"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001811610177__afa890e7fe2044a8d80553f4e22db9e52">ev_enabled</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001811610177__a356783686f304d58aa5aea55e57234be">Char</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001811610177__a3dfa0821d1034b1bb5133b95d478427f">Controls in which mode the rule fires</p>
<ul id="EN-US_TOPIC_0000001811610177__u0c46994241784f4c8a6c9e1138439327"><li id="EN-US_TOPIC_0000001811610177__l04cb98fcf77446e995a38c7f4945f1d0"><strong id="EN-US_TOPIC_0000001811610177__b181012099852638">O</strong>: The rule fires in "origin" and "local" modes.</li><li id="EN-US_TOPIC_0000001811610177__l0d8b443cf32a43a5aa3e8f8de07cd980"><strong id="EN-US_TOPIC_0000001811610177__b168464848752638">D</strong>: The rule is disabled.</li><li id="EN-US_TOPIC_0000001811610177__lf3d059fab29d44759ebc8cd0d9031937"><strong id="EN-US_TOPIC_0000001811610177__b56120137752638">R</strong>: The rule fires in "replica" mode.</li><li id="EN-US_TOPIC_0000001811610177__lb8be90b445e74bb699ce0863775c5785"><strong id="EN-US_TOPIC_0000001811610177__b56465165252638">A</strong>: The rule always fires.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001811610177__rdb5d6b0a64b449f19657a56085907e3e"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001811610177__abab5e27910ce4c999c575e6672599b26">is_instead</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001811610177__a5fe76db588e94dc8a4a35aa5f0e39a40"><span id="EN-US_TOPIC_0000001811610177__text115092102374">boolean</span></p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001811610177__a3f25dcf752bf48e1a6b7293fbeec1c18">Its value is <strong id="EN-US_TOPIC_0000001811610177__b152831259101414">true</strong> if the rule is an <strong id="EN-US_TOPIC_0000001811610177__b928413595149">INSTEAD</strong> rule.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001811610177__r37575edd004f41f9acfeda4494ea3713"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001811610177__a4e7bcdf97bbc40a29f9f42f44572cf66">ev_qual</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001811610177__a5f7a40b864eb472a837caeb79e2b1941">pg_node_tree</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001811610177__acb544d2b23fd487996db435c4bfb7469">Expression tree (in the form of a <strong id="EN-US_TOPIC_0000001811610177__b142906940452638">nodeToString()</strong> representation) for the rule's qualifying condition</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001811610177__r0e4a640c3fc34aaa9728f25b38ce5f52"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001811610177__a67eb8b9a40ec42b484c6409e2820afa0">ev_action</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001811610177__acceadc8f831140f993ef5340e8a22e7e">pg_node_tree</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001811610177__ab95481e2f6014eb7b06bc9fc2135beb5">Query tree (in the form of a <strong id="EN-US_TOPIC_0000001811610177__b208259371952638">nodeToString</strong>() representation) for the rule's action</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001811610177__row152932142912"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001811610177__p145292027293">state_change</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001811610177__p1852962152912">Timestamp with time zone</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001811610177__p052916214296">Time when the <strong id="EN-US_TOPIC_0000001811610177__b1934617271954">ev_enabled</strong> field is updated. This column is available only in clusters of version 9.1.0.200 or later.</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>