-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcatalog-pg-enum.html
More file actions
90 lines (90 loc) · 8.32 KB
/
catalog-pg-enum.html
File metadata and controls
90 lines (90 loc) · 8.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>52.20. pg_enum</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="catalog-pg-description.html" title="52.19. pg_description" /><link rel="next" href="catalog-pg-event-trigger.html" title="52.21. pg_event_trigger" /><meta name="viewport" content="width=device-width,initial-scale=1.0" /></head><body id="docContent" class="container-fluid col-10"><div class="other_version"><a href="https://www.postgresql.jp/document/">バージョンごとのドキュメント一覧</a></div><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="4" align="center"><a accesskey="h" href="index.html">PostgreSQL 18.3文書</a></th></tr><tr><td width="10%" align="left"></td><td width="10%" align="left"></td><td width="60%" align="center"><a href="catalogs.html" title="第52章 システムカタログ">第52章 システムカタログ</a></td><td width="20%" align="right"><div class="actions"><a class="issue" title="github" href="https://github.com/pgsql-jp/jpug-doc/issues/new?template=bug_report.yml&what-happened=version 18.3 : catalog-pg-enum.html">誤訳等の報告
</a></div></td></tr><tr><td width="10%" align="left"><a accesskey="p" href="catalog-pg-description.html" title="52.19. pg_description">前へ</a> </td><td width="10%" align="left"><a accesskey="u" href="catalogs.html" title="第52章 システムカタログ">上へ</a></td><td width="60%" align="center">52.20. <code class="structname">pg_enum</code></td><td width="20%" align="right"> <a accesskey="n" href="catalog-pg-event-trigger.html" title="52.21. pg_event_trigger">次へ</a></td></tr></table><hr /></div><div class="sect1" id="CATALOG-PG-ENUM"><div class="titlepage"><div><div><h2 class="title" style="clear: both">52.20. <code class="structname">pg_enum</code> <a href="#CATALOG-PG-ENUM" class="id_link">#</a></h2></div></div></div><a id="id-1.10.4.22.2" class="indexterm"></a><p>
<span class="original">
The <structname>pg_enum</structname> catalog contains 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 <structname>pg_enum</structname>.
</span>
<code class="structname">pg_enum</code>カタログは、各列挙型についてその値とラベルを示す項目を含みます。
ある与えられた列挙値の内部表現は、実際には<code class="structname">pg_enum</code>内の関連付けられた行のOIDです。
</p><div class="table" id="id-1.10.4.22.4"><p class="title"><strong>表52.20 <code class="structname">pg_enum</code>の列</strong></p><div class="table-contents"><span class="original">
<title><structname>pg_enum</structname> Columns</title>
</span><table class="table" summary="pg_enumの列" border="1"><colgroup><col /></colgroup><thead><tr><th class="catalog_table_entry"><p class="column_definition">
<span class="original">
Column Type
</span>
列 型
</p>
<p>
<span class="original">
Description
</span>
説明
</p></th></tr></thead><tbody><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">oid</code> <code class="type">oid</code>
</p>
<p>
<span class="original">
Row identifier
</span>
行識別子
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">enumtypid</code> <code class="type">oid</code>
<span class="original">
(references <link linkend="catalog-pg-type"><structname>pg_type</structname></link>.<structfield>oid</structfield>)
</span>
(参照先 <a class="link" href="catalog-pg-type.html" title="52.64. pg_type"><code class="structname">pg_type</code></a>.<code class="structfield">oid</code>)
</p>
<p>
<span class="original">
The OID of the <link linkend="catalog-pg-type"><structname>pg_type</structname></link> entry owning this enum value
</span>
この列挙値を所有している<a class="link" href="catalog-pg-type.html" title="52.64. pg_type"><code class="structname">pg_type</code></a>項目のOID
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">enumsortorder</code> <code class="type">float4</code>
</p>
<p>
<span class="original">
The sort position of this enum value within its enum type
</span>
列挙型におけるこの列挙値のソート位置
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">enumlabel</code> <code class="type">name</code>
</p>
<p>
<span class="original">
The textual label for this enum value
</span>
この列挙値のテキストラベル
</p></td></tr></tbody></table></div></div><br class="table-break" /><p>
<span class="original">
The OIDs for <structname>pg_enum</structname> 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
<structfield>enumsortorder</structfield> 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.
</span>
<code class="structname">pg_enum</code>行のOIDは次のような特別な規則に従います。
列挙型のソート順序と同じ順序で並んだ偶数のOIDが保証されています。
つまり、2つの偶数のOIDが同じ列挙型に属する場合、OIDの小さい方がより小さい<code class="structfield">enumsortorder</code>値を持たなければなりません。
奇数のOID値はソート順序に関連を持ってはなりません。
この規則により列挙の比較処理は多くの一般的な場合でカタログの検索を防ぐことができます。
列挙型の作成および変更を行う処理は、可能であれば偶数のOIDを列挙値に割り当てようとします。
</p><p>
<span class="original">
When an enum type is created, its members are assigned sort-order
positions 1..<replaceable>n</replaceable>. But members added later might be given
negative or fractional values of <structfield>enumsortorder</structfield>.
The only requirement on these values is that they be correctly
ordered and unique within each enum type.
</span>
列挙型を作成する時、そのメンバには1..<em class="replaceable"><code>n</code></em>のソート順位置が割り当てられます。
しかし後で追加されたメンバには負もしくは<code class="structfield">enumsortorder</code>の小数値が与えられる可能性があります。
これらの値の要件は、各列挙型の中で正しく順序付けされ、かつ一意であることだけです。
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="catalog-pg-description.html" title="52.19. pg_description">前へ</a> </td><td width="20%" align="center"><a accesskey="u" href="catalogs.html" title="第52章 システムカタログ">上へ</a></td><td width="40%" align="right"> <a accesskey="n" href="catalog-pg-event-trigger.html" title="52.21. pg_event_trigger">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">52.19. <code class="structname">pg_description</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.3文書">ホーム</a></td><td width="40%" align="right" valign="top"> 52.21. <code class="structname">pg_event_trigger</code></td></tr></table></div></body></html>