バージョンごとのドキュメント一覧

37.7. character_sets #

The view <literal>character_sets</literal> identifies the character sets available in the current database. Since PostgreSQL does not support multiple character sets within one database, this view only shows one, which is the database encoding. このcharacter_setsビューは、現在のデータベースで利用可能な文字セットを示します。 PostgreSQLはひとつのデータベース内で複数の文字セットをサポートしないので、このビューは常にデータベースエンコーディングの一行だけを表示します。

Take note of how the following terms are used in the SQL standard: 以下の用語のSQL標準での使われ方に注意してください。

文字集合

An abstract collection of characters, for example <literal>UNICODE</literal>, <literal>UCS</literal>, or <literal>LATIN1</literal>. Not exposed as an SQL object, but visible in this view. 例えばUNICODEUCSLATIN1といった抽象的な文字集合です。SQLオブジェクトとしては出てきませんが、このビューで参照できます。

文字符号化形式

An encoding of some character repertoire. Most older character repertoires only use one encoding form, and so there are no separate names for them (e.g., <literal>LATIN1</literal> is an encoding form applicable to the <literal>LATIN1</literal> repertoire). But for example Unicode has the encoding forms <literal>UTF8</literal>, <literal>UTF16</literal>, etc. (not all supported by PostgreSQL). Encoding forms are not exposed as an SQL object, but are visible in this view. 文字集合の符号化方式です。 ほとんどの古い文字集合はひとつの符号化形式を使うため、それらについては分離した名称はありません(たとえば、LATIN1LATIN1集合に適用可能な符号化形式です)。 しかし例えばUnicodeにはUTF8UTF16などの符号化形式があります(PostgreSQLでは一部だけサポートしています)。 符号化形式はSQLオブジェクトとして表にでませんが、このビューで参照できます。

文字セット

A named SQL object that identifies a character repertoire, a character encoding, and a default collation. A predefined character set would typically have the same name as an encoding form, but users could define other names. For example, the character set <literal>UTF8</literal> would typically identify the character repertoire <literal>UCS</literal>, encoding form <literal>UTF8</literal>, and some default collation. 文字集合、文字符号化方式とデフォルトの照合を識別する順序名前つきのSQLオブジェクトです。定義済みの文字セットは、一般的に符号化形式と同じ名前を持ちますが、ユーザは他の名前を定義できます。 例えば、文字セットUTF8は一般的に文字集合UCS、符号化形式UTF8と何らかのデフォルト照合を示します。

You can think of an <quote>encoding</quote> in PostgreSQL either as a character set or a character encoding form. They will have the same name, and there can only be one in one database. PostgreSQLにおけるencodingは、文字セットまたは文字符号化形式のいずれかと考えられます。これらは同じ名前を持ち一つのデータベースでは一つだけ存在できます。

表37.5 character_setsの列

<title><structname>character_sets</structname> Columns</title>

Column Type 列 型

Description 説明

character_set_catalog sql_identifier

Character sets are currently not implemented as schema objects, so this column is null. 文字セットはスキーマオブジェクトとして実装されていないので、この列はNULLです。

character_set_schema sql_identifier

Character sets are currently not implemented as schema objects, so this column is null. 文字セットはスキーマオブジェクトとして実装されていないので、この列はNULLです。

character_set_name sql_identifier

Name of the character set, currently implemented as showing the name of the database encoding 文字セットの名前で、現在はデータベースエンコーディングを表示するように実装されています。

character_repertoire sql_identifier

Character repertoire, showing <literal>UCS</literal> if the encoding is <literal>UTF8</literal>, else just the encoding name 文字集合で、エンコーディングがUTF8の場合はUCSを、それ以外の場合は単にエンコーディング名を表示します。

form_of_use sql_identifier

Character encoding form, same as the database encoding 文字符号化形式で, データベースエンコーディングと同じです。

default_collate_catalog sql_identifier

Name of the database containing the default collation (always the current database, if any collation is identified) デフォルト照合を含むデータベース(いずれかの照合が識別された場合は常に現在のデータベース)の名前です。

default_collate_schema sql_identifier

Name of the schema containing the default collation デフォルト照合を含むスキーマの名前です。

default_collate_name sql_identifier

Name of the default collation. The default collation is identified as the collation that matches the <literal>COLLATE</literal> and <literal>CTYPE</literal> settings of the current database. If there is no such collation, then this column and the associated schema and catalog columns are null. デフォルト照合の名前です。デフォルト照合は、現在のデータベースのCOLLATECTYPE設定に一致する照合として識別されます。そのような照合が存在しない場合は、この列や対応するスキーマやカタログの列はNULLです。