-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcatalog-pg-collation.html
More file actions
181 lines (181 loc) · 14.7 KB
/
catalog-pg-collation.html
File metadata and controls
181 lines (181 loc) · 14.7 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?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.12. pg_collation</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-class.html" title="52.11. pg_class" /><link rel="next" href="catalog-pg-constraint.html" title="52.13. pg_constraint" /><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-collation.html">誤訳等の報告
</a></div></td></tr><tr><td width="10%" align="left"><a accesskey="p" href="catalog-pg-class.html" title="52.11. pg_class">前へ</a> </td><td width="10%" align="left"><a accesskey="u" href="catalogs.html" title="第52章 システムカタログ">上へ</a></td><td width="60%" align="center">52.12. <code class="structname">pg_collation</code></td><td width="20%" align="right"> <a accesskey="n" href="catalog-pg-constraint.html" title="52.13. pg_constraint">次へ</a></td></tr></table><hr /></div><div class="sect1" id="CATALOG-PG-COLLATION"><div class="titlepage"><div><div><h2 class="title" style="clear: both">52.12. <code class="structname">pg_collation</code> <a href="#CATALOG-PG-COLLATION" class="id_link">#</a></h2></div></div></div><a id="id-1.10.4.14.2" class="indexterm"></a><p>
<span class="original">
The catalog <structname>pg_collation</structname> describes the
available collations, which are essentially mappings from an SQL
name to operating system locale categories.
See <xref linkend="collation"/> for more information.
</span>
<code class="structname">pg_collation</code>カタログは利用可能、SQL名とオペレーティングシステムのロケールカテゴリとの基本的な対応付けを行う照合順序を記述します。
詳細は <a class="xref" href="collation.html" title="23.2. 照合順序サポート">23.2</a>を参照してください。
</p><div class="table" id="id-1.10.4.14.4"><p class="title"><strong>表52.12 <code class="structname">pg_collation</code>の列</strong></p><div class="table-contents"><span class="original">
<title><structname>pg_collation</structname> Columns</title>
</span><table class="table" summary="pg_collationの列" 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">collname</code> <code class="type">name</code>
</p>
<p>
<span class="original">
Collation name (unique per namespace and encoding)
</span>
照合順序の名前(名前空間およびエンコード方式で一意)
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">collnamespace</code> <code class="type">oid</code>
<span class="original">
(references <link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.<structfield>oid</structfield>)
</span>
(参照先 <a class="link" href="catalog-pg-namespace.html" title="52.32. pg_namespace"><code class="structname">pg_namespace</code></a>.<code class="structfield">oid</code>)
</p>
<p>
<span class="original">
The OID of the namespace that contains this collation
</span>
この照合順序を含む名前空間のOID
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">collowner</code> <code class="type">oid</code>
<span class="original">
(references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>)
</span>
(参照先 <a class="link" href="catalog-pg-authid.html" title="52.8. pg_authid"><code class="structname">pg_authid</code></a>.<code class="structfield">oid</code>)
</p>
<p>
<span class="original">
Owner of the collation
</span>
照合順序の所有者
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">collprovider</code> <code class="type">char</code>
</p>
<p>
<span class="original">
Provider of the collation: <literal>d</literal> = database default,
<literal>b</literal> = builtin, <literal>c</literal> = libc,
<literal>i</literal> = icu </para></entry>
</span>
照合順序のプロバイダ: <code class="literal">d</code> = データベースのデフォルト、 <code class="literal">b</code> = builtin、 <code class="literal">c</code> = libc、 <code class="literal">i</code> = icu
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">collisdeterministic</code> <code class="type">bool</code>
</p>
<p>
<span class="original">
Is the collation deterministic?
</span>
照合順序は決定論的か?
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">collencoding</code> <code class="type">int4</code>
</p>
<p>
<span class="original">
Encoding in which the collation is applicable, or -1 if it
works for any encoding
</span>
この照合順序を適用できるエンコード方式。任意のエンコード方式で動作する場合は-1
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">collcollate</code> <code class="type">text</code>
</p>
<p>
<span class="original">
<symbol>LC_COLLATE</symbol> for this collation object. If the provider is
not <literal>libc</literal>, <structfield>collcollate</structfield> is
<literal>NULL</literal> and <structfield>colllocale</structfield> is
used instead.
</span>
この照合順序オブジェクト用の<code class="symbol">LC_COLLATE</code>。
プロバイダが<code class="literal">libc</code>でない場合、<code class="structfield">collcollate</code>は<code class="literal">NULL</code>になり、代わりに<code class="structfield">colllocale</code>が使用されます。
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">collctype</code> <code class="type">text</code>
</p>
<p>
<span class="original">
<symbol>LC_CTYPE</symbol> for this collation object. If the provider is
not <literal>libc</literal>, <structfield>collctype</structfield> is
<literal>NULL</literal> and <structfield>colllocale</structfield> is
used instead.
</span>
この照合順序オブジェクト用の<code class="symbol">LC_CTYPE</code>。
プロバイダが<code class="literal">libc</code>でない場合、<code class="structfield">collctype</code>は<code class="literal">NULL</code>になり、代わりに<code class="structfield">colllocale</code>が使用されます。
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">colllocale</code> <code class="type">text</code>
</p>
<p>
<span class="original">
Collation provider locale name for this collation object. If the
provider is <literal>libc</literal>,
<structfield>colllocale</structfield> is <literal>NULL</literal>;
<structfield>collcollate</structfield> and
<structfield>collctype</structfield> are used instead.
</span>
この照合順序オブジェクト用の照合順序プロバイダのロケール名。
プロバイダが<code class="literal">libc</code>の場合、<code class="structfield">colllocale</code>は<code class="literal">NULL</code>です。
代わりに<code class="structfield">collcollate</code>と<code class="structfield">collctype</code>が使用されます。
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">collicurules</code> <code class="type">text</code>
</p>
<p>
<span class="original">
ICU collation rules for this collation object
</span>
この照合オブジェクトのICU照合規則
</p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
<code class="structfield">collversion</code> <code class="type">text</code>
</p>
<p>
<span class="original">
Provider-specific version of the collation. This is recorded when the
collation is created and then checked when it is used, to detect
changes in the collation definition that could lead to data corruption.
</span>
この照合順序に対する提供者固有のバージョンです。
これは照合順序が作成された時に記録され、データの破壊につながりかねない照合順序定義の変更を検知するために使用時に検査されます。
</p></td></tr></tbody></table></div></div><br class="table-break" /><p>
<span class="original">
Note that the unique key on this catalog is (<structfield>collname</structfield>,
<structfield>collencoding</structfield>, <structfield>collnamespace</structfield>) not just
(<structfield>collname</structfield>, <structfield>collnamespace</structfield>).
<productname>PostgreSQL</productname> generally ignores all
collations that do not have <structfield>collencoding</structfield> equal to
either the current database's encoding or -1, and creation of new entries
with the same name as an entry with <structfield>collencoding</structfield> = -1
is forbidden. Therefore it is sufficient to use a qualified SQL name
(<replaceable>schema</replaceable>.<replaceable>name</replaceable>) to identify a collation,
even though this is not unique according to the catalog definition.
The reason for defining the catalog this way is that
<application>initdb</application> fills it in at cluster initialization time with
entries for all locales available on the system, so it must be able to
hold entries for all encodings that might ever be used in the cluster.
</span>
このカタログの一意キーは(<code class="structfield">collname</code>, <code class="structfield">collnamespace</code>)だけではなく(<code class="structfield">collname</code>,<code class="structfield">collencoding</code>, <code class="structfield">collnamespace</code>)です。
<span class="productname">PostgreSQL</span>は通常、<code class="structfield">collencoding</code>が現在のデータベースのエンコード方式または-1と一致しない照合順序をすべて無視します。
また、<code class="structfield">collencoding</code> = -1を持つ項目と名前が一致する新しい項目の作成は許されません。
したがって照合順序を識別するためには、カタログの定義に従った一意ではない場合であっても、限定されたSQL名称(<em class="replaceable"><code>schema</code></em>.<em class="replaceable"><code>name</code></em>)を使用することで十分です。
このようにカタログを定義した理由は、クラスタの初期化時に<span class="application">initdb</span> がシステムで利用可能なすべてのロケール用の項目でこのカタログにデータを投入するためです。
その為、今後そのクラスタで使用される可能性があるすべてのエンコード方式のエントリを保持できるようにしなければなりません。
</p><p>
<span class="original">
In the <literal>template0</literal> database, it could be useful to create
collations whose encoding does not match the database encoding,
since they could match the encodings of databases later cloned from
<literal>template0</literal>. This would currently have to be done manually.
</span>
後で<code class="literal">template0</code>から複製されるデータベースのエンコード方式と一致するかもしれないので、<code class="literal">template0</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-class.html" title="52.11. pg_class">前へ</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-constraint.html" title="52.13. pg_constraint">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">52.11. <code class="structname">pg_class</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.13. <code class="structname">pg_constraint</code></td></tr></table></div></body></html>