doc-exports/docs/dws/dev/dws_04_0614.html
Lu, Huayi a24ca60074 DWS DEVELOPER 811 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-01-19 13:37:49 +00:00

82 lines
8.2 KiB
HTML

<a name="EN-US_TOPIC_0000001098814790"></a><a name="EN-US_TOPIC_0000001098814790"></a>
<h1 class="topictitle1">PG_REWRITE</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001098814790__a7434f913ee23483e8e9d9fea8a2f9c44"><strong id="EN-US_TOPIC_0000001098814790__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_0000001098814790__tfcad57a4417142acb2b406b33fc7c3f8" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PG_REWRITE columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001098814790__rd03b279decbb464e9b9e8554ef6d5f27"><th align="left" class="cellrowborder" valign="top" width="25.77%" id="mcps1.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001098814790__aba45333886d6417bb89febc9dbe2283f"><strong id="EN-US_TOPIC_0000001098814790__b84235270691445">Name</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_0000001098814790__ad8e4d7e53b414d6daa3f2907c88f00f8">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_0000001098814790__a1221b7e183144c0ba90a01cded47d978">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001098814790__reaad31b1209c4726988ff3de4eebca62"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814790__a1643b2eef49f4020ae82ad02c07c8bb6">rulename</p>
</td>
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098814790__a4e336785c85141e281548088973d3837">name</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814790__ae2576694cf3b458e9331ffc6efbe5964">Rule name</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814790__r059016706bfd4d50b5c823c50674a888"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814790__a6f3836c1d3bf4e97abde1e0b732b94d9">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_0000001098814790__addce31f7bb2a4b8893661eb1d42d65f2">oid</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814790__a031dfe494dfb4b5ebcf0642e8ac94a20">Name of the table that uses the rule</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814790__r64db3e46d9b14902bfd5acde1603c55d"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814790__a31e8188646424507bd9cab774316a084">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_0000001098814790__a367c2bb182484b81a21c6947cf1c0701">smallint</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814790__ac2ce0b657b404f05a5f33f494775209f">Column this rule is for (always <strong id="EN-US_TOPIC_0000001098814790__b171541441236">0</strong> to indicate the entire table)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814790__rf42f3358e31f4997a1b17cab20f02eca"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814790__a8d211e23f221463b8c71e9685e1cb6aa">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_0000001098814790__ac6c7e270cd9349e1b8a8b3efdb735368">"char"</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814790__af8d38a621cdc455c81943ced2a1bc03e">Event type for this rule:</p>
<ul id="EN-US_TOPIC_0000001098814790__u203de141ee2c4b98a5c1bd9534ed6779"><li id="EN-US_TOPIC_0000001098814790__lb8800da84eac4300b3dc2a1a3d5dc28e">1 = SELECT</li><li id="EN-US_TOPIC_0000001098814790__l03974aaad96e4e089730c6694b405f71">2 = UPDATE</li><li id="EN-US_TOPIC_0000001098814790__lb56b8d547d8741bfa9dca1ea7a0fc9a3">3 = INSERT</li><li id="EN-US_TOPIC_0000001098814790__l9fc0d469320f44719061c5d52766ceff">4 = DELETE</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814790__rd531adad960242329ffec556260e1510"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814790__a14901c7a2eed49b3a5f5c261c6cdba9d">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_0000001098814790__af686bc0090634717a754860dc4bdcba3">"char"</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098814790__afaa01227466c47fea1f113af5a0a9c18">Controls in which mode the rule fires</p>
<ul id="EN-US_TOPIC_0000001098814790__u8c49bf3aa1ef4c4f839b831246918004"><li id="EN-US_TOPIC_0000001098814790__ld93defaddb0448e78a5ffa76f7a2d06a"><strong id="EN-US_TOPIC_0000001098814790__b145895384308">O</strong>: The rule fires in "origin" and "local" modes.</li><li id="EN-US_TOPIC_0000001098814790__l90757e6ebfd34e13a3aa58b0d9201213"><strong id="EN-US_TOPIC_0000001098814790__b18460134318305">D</strong>: The rule is disabled.</li><li id="EN-US_TOPIC_0000001098814790__l384a6b7ce2a44597baf3e163f56c3d96"><strong id="EN-US_TOPIC_0000001098814790__b32441446163016">R</strong>: The rule fires in "replica" mode.</li><li id="EN-US_TOPIC_0000001098814790__l82da0577fc9e472d8aaa1d18ef74b55e"><strong id="EN-US_TOPIC_0000001098814790__b1325916496307">A</strong>: The rule always fires.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814790__rb759ea00d8e449ef86821d4fb2401ab6"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814790__a4445d7f362424446982dfaaa182a66f1">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_0000001098814790__a493301b8dc1841c39915c7929e8aab94"><span id="EN-US_TOPIC_0000001098814790__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_0000001098814790__a9523a92590254b61977c3a2a6b79ea71">Its value is <strong id="EN-US_TOPIC_0000001098814790__b84235270621043">true</strong> if the rule is an <strong id="EN-US_TOPIC_0000001098814790__b93682025152813">INSTEAD</strong> rule.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814790__r999fdd5a02ec4162b3955cc4efdf669e"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814790__aaa8feab2709b482c98d914ec86335ec9">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_0000001098814790__ac9349ab5f99f46e3927598954ba65cd4">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_0000001098814790__ab77310c18118438e85e628125d575790">Expression tree (in the form of a <strong id="EN-US_TOPIC_0000001098814790__b842352706114731">nodeToString()</strong> representation) for the rule's qualifying condition</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098814790__r5eb0d94f7eab40ea919f1c45077a5c84"><td class="cellrowborder" valign="top" width="25.77%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098814790__acd5ce28344214092beb315881d766f3a">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_0000001098814790__ab1d311173a604df3b35e6bf55166d960">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_0000001098814790__a37a2c73aae48419bbbe9050ed9019450">Query tree (in the form of a <strong id="EN-US_TOPIC_0000001098814790__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>