forked from docs/doc-exports
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>
64 lines
6.3 KiB
HTML
64 lines
6.3 KiB
HTML
<a name="EN-US_TOPIC_0000001188163584"></a><a name="EN-US_TOPIC_0000001188163584"></a>
|
|
|
|
<h1 class="topictitle1">PG_ENUM</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001188163584__en-us_topic_0059777741_p870696145213"><strong id="EN-US_TOPIC_0000001188163584__b17413813439">PG_ENUM</strong> records entries showing the values and labels for each enum type. The internal representation of a given enum value is actually the OID of its associated row in <strong id="EN-US_TOPIC_0000001188163584__b842352706171321">pg_enum</strong>.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001188163584__t5a8af24fbbee44cda652a832f5029385" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PG_ENUM columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001188163584__r8ee3e048b57e4752bfc795300f679b76"><th align="left" class="cellrowborder" valign="top" width="20.49%" id="mcps1.3.2.2.5.1.1"><p id="EN-US_TOPIC_0000001188163584__aca74459e92ca43f2bd2ef192905a5723">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10.9%" id="mcps1.3.2.2.5.1.2"><p id="EN-US_TOPIC_0000001188163584__a5e032d319d44447e96d43b6b4c6e182e">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.55%" id="mcps1.3.2.2.5.1.3"><p id="EN-US_TOPIC_0000001188163584__aa61da4ce62f64b8995ab363f1ae949a3">Reference</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="49.059999999999995%" id="mcps1.3.2.2.5.1.4"><p id="EN-US_TOPIC_0000001188163584__a154440cb9e9c41b585ccabcfbee63cac">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001188163584__r08965e4295e4437bb9614fdebf6cc912"><td class="cellrowborder" valign="top" width="20.49%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001188163584__a15dd9280aa154a3a8202aae21bf0dd05">oid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.9%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001188163584__a66d9a9d0356842eba0fea4c9d97a8c9e">oid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001188163584__ac2500081263f4134b3b2d7a2f596ea6d">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.059999999999995%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001188163584__adfcd6bd679bb48cd8554df18a788a754">Row identifier (hidden attribute; must be explicitly selected)</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163584__r1078bd3a32074ceb93926129dcd7e431"><td class="cellrowborder" valign="top" width="20.49%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001188163584__a8c36aff6cff54c16a75d02262a22e3a9">enumtypid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.9%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001188163584__aaca122ae16d14c9c8efff993146720fd">oid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001188163584__a7b17e0eb64aa4457a7bd0df44223cdec"><a href="dws_04_0629.html">PG_TYPE</a>.oid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.059999999999995%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001188163584__a4a804aa8f9a340c0805788ad364fdc0d">OID of the <strong id="EN-US_TOPIC_0000001188163584__b64907978041753">pg_type</strong> entry that contains this enum value</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163584__rc309822c954f45d8b1673d71c6812a2d"><td class="cellrowborder" valign="top" width="20.49%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001188163584__aa67998e424204614baadfa7709bbfaad">enumsortorder</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.9%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001188163584__ad72d67da9e9b4c28b28b9691b12e5fcc">real</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001188163584__a9da59dcca20541c4868868c7b129922c">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.059999999999995%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001188163584__a63f2801ad7df412ca00f5af8b7ba0cd3">Sort position of this enum value within its enum type</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001188163584__re42d0dc60a4b4f47b2257c5dc0983948"><td class="cellrowborder" valign="top" width="20.49%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001188163584__a981dbc33cf8c4e788fc5d409aa4777d1">enumlabel</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.9%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001188163584__a39823cfe5ad94a12ba7fe4b75bcfe429">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001188163584__ae8a1938231104ce594523c1531cce7c5">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.059999999999995%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001188163584__a15ef6375dbd44265bada1a23863f4379">Textual label for this enum value</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001188163584__a17e0951461dc4d258129ee92aa6331d3">The OIDs for <strong id="EN-US_TOPIC_0000001188163584__b11599069441753">PG_ENUM</strong> rows follow a special rule: even-numbered OIDs are guaranteed to be ordered in the same way as the sort ordering of their enum type. That is, if two even OIDs belong to the same enum type, the smaller OID must have the smaller <strong id="EN-US_TOPIC_0000001188163584__b842352706171725">enumsortorder</strong> value. Odd-numbered OID values need bear no relationship to the sort order. This rule allows the enum comparison routines to avoid catalog lookups in many common cases. The routines that create and alter enum types attempt to assign even OIDs to enum values whenever possible.</p>
|
|
<p id="EN-US_TOPIC_0000001188163584__a007164fe7b804f6798775074d4b91732">When an enum type is created, its members are assigned sort-order positions from 1 to <em id="EN-US_TOPIC_0000001188163584__i186776519176">n</em>. But members added later might be given negative or fractional values of <strong id="EN-US_TOPIC_0000001188163584__b15784512181810">enumsortorder</strong>. The only requirement on these values is that they be correctly ordered and unique within each enum type.</p>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0561.html">System Catalogs</a></div>
|
|
</div>
|
|
</div>
|
|
|