-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcatalog-pg-collation.html
More file actions
42 lines (42 loc) · 8.57 KB
/
Copy pathcatalog-pg-collation.html
File metadata and controls
42 lines (42 loc) · 8.57 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
<?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>50.12. pg_collation</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="catalog-pg-class.html" title="50.11. pg_class" /><link rel="next" href="catalog-pg-constraint.html" title="50.13. pg_constraint" /><meta name="viewport" content="width=device-width,initial-scale=1.0" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left" colspan="2"></td><th width="60%" align="center"><a accesskey="h" href="index.html">PostgreSQL 9.6.5文書</a></th><td width="20%" align="right"><div class="actions"><a class="issue" href="https://github.com/pgsql-jp/jpug-doc/issues/new?title=version 9.6.5 catalog-pg-collation.html">誤訳等の報告</a></div></td></tr><tr><td width="10%" align="left" valign="top"><a accesskey="p" href="catalog-pg-class.html">前へ</a> </td><td width="10%" align="left" valign="top"><a accesskey="u" href="catalogs.html">上へ</a></td><td width="60%" align="center">50.12. <code class="structname">pg_collation</code></td><td width="20%" align="right" valign="top"> <a accesskey="n" href="catalog-pg-constraint.html">次へ</a></td></tr></table><hr /></div><div class="sect1" id="catalog-pg-collation"><div class="titlepage"><div><div><h2 class="title" style="clear: both">50.12. <code class="structname">pg_collation</code></h2></div></div></div><a id="idm45823015392864" 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="idm45823015389936"><p class="title"><strong>表50.12 <code class="structname">pg_collation</code>の列</strong></p><div class="table-contents"><span class="original">
<title><structname>pg_collation</> Columns</title>
</span><table class="table" summary="pg_collationの列" border="1"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>名前</th><th>型</th><th>参照先</th><th>説明</th></tr></thead><tbody><tr><td><code class="structfield">oid</code></td><td><code class="type">oid</code></td><td> </td><td>行識別子(隠し属性です。明示的に選択しなければなりません)</td></tr><tr><td><code class="structfield">collname</code></td><td><code class="type">name</code></td><td> </td><td>照合順序の名前(名前空間およびエンコード方式で一意)</td></tr><tr><td><code class="structfield">collnamespace</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-namespace.html" title="50.32. pg_namespace"><code class="structname">pg_namespace</code></a>.oid</code></td><td><span class="original">
The OID of the namespace that contains this collation
</span>この照合順序を含む名前空間のOID
</td></tr><tr><td><code class="structfield">collowner</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-authid.html" title="50.8. pg_authid"><code class="structname">pg_authid</code></a>.oid</code></td><td>照合順序の所有者</td></tr><tr><td><code class="structfield">collencoding</code></td><td><code class="type">int4</code></td><td> </td><td>この照合順序を適用することができるエンコード方式。任意のエンコード方式で動作する場合は-1</td></tr><tr><td><code class="structfield">collcollate</code></td><td><code class="type">name</code></td><td> </td><td>この照合順序オブジェクト用の<code class="symbol">LC_COLLATE</code></td></tr><tr><td><code class="structfield">collctype</code></td><td><code class="type">name</code></td><td> </td><td>この照合順序オブジェクト用の<code class="symbol">LC_CTYPE</code></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>collencoding</>, <structfield>collnamespace</>) not just
(<structfield>collname</>, <structfield>collnamespace</>).
<productname>PostgreSQL</productname> generally ignores all
collations that do not have <structfield>collencoding</> 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</> = -1
is forbidden. Therefore it is sufficient to use a qualified SQL name
(<replaceable>schema</>.<replaceable>name</>) 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</> 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</> 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</>. 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">前へ</a> </td><td width="20%" align="center"><a accesskey="u" href="catalogs.html">上へ</a></td><td width="40%" align="right"> <a accesskey="n" href="catalog-pg-constraint.html">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">50.11. <code class="structname">pg_class</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html">ホーム</a></td><td width="40%" align="right" valign="top"> 50.13. <code class="structname">pg_constraint</code></td></tr></table></div></body></html>