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

37.24. element_types #

The view <literal>element_types</literal> contains the data type descriptors of the elements of arrays. When a table column, composite-type attribute, domain, function parameter, or function return value is defined to be of an array type, the respective information schema view only contains <literal>ARRAY</literal> in the column <literal>data_type</literal>. To obtain information on the element type of the array, you can join the respective view with this view. For example, to show the columns of a table with data types and array element types, if applicable, you could do: element_typesには、配列の要素のデータ型記述子が含まれます。 テーブル列、複合データ型属性、ドメイン、関数パラメータ、関数の戻り値が配列型であると宣言された場合、 情報スキーマの各ビューでは、data_type列にARRAYだけが含まれます。 配列の要素の型についての情報を取り出すには、各ビューとこのビューを結合することで可能です。 例えば、テーブルの列のデータ型と、もし適切ならば、配列の要素型を表示するには、以下のように行います。

SELECT c.column_name, c.data_type, e.data_type AS element_type
FROM information_schema.columns c LEFT JOIN information_schema.element_types e
     ON ((c.table_catalog, c.table_schema, c.table_name, 'TABLE', c.dtd_identifier)
       = (e.object_catalog, e.object_schema, e.object_name, e.object_type, e.collection_type_identifier))
WHERE c.table_schema = '...' AND c.table_name = '...'
ORDER BY c.ordinal_position;

This view only includes objects that the current user has access to, by way of being the owner or having some privilege. このビューは、所有者である、適切な権限を持っているといった方法で、現在のユーザがアクセスできるオブジェクトのみが含まれます。

表37.22 element_typesの列

<title><structname>element_types</structname> Columns</title>

Column Type 列 型

Description 説明

object_catalog sql_identifier

Name of the database that contains the object that uses the array being described (always the current database) 記述される配列を使用するオブジェクトを持つデータベースの名前です (常に現在のデータベースです)。

object_schema sql_identifier

Name of the schema that contains the object that uses the array being described 記述される配列を使用するオブジェクトを持つスキーマの名前です。

object_name sql_identifier

Name of the object that uses the array being described 記述される配列を使用するオブジェクトの名前です。

object_type character_data

The type of the object that uses the array being described: one of <literal>TABLE</literal> (the array is used by a column of that table), <literal>USER-DEFINED TYPE</literal> (the array is used by an attribute of that composite type), <literal>DOMAIN</literal> (the array is used by that domain), <literal>ROUTINE</literal> (the array is used by a parameter or the return data type of that function). 記述される配列を使用するオブジェクトの種類です。 TABLE(その配列がテーブルの列によって使用される)、USER-DEFINED TYPE(その配列が複合データ型の属性によって使用される)、DOMAIN(その配列がドメインによって使用される)、ROUTINE(その配列が関数のパラメータ、もしくは戻り値の型によって使用される)のいずれかです。

collection_type_identifier sql_identifier

The identifier of the data type descriptor of the array being described. Use this to join with the <literal>dtd_identifier</literal> columns of other information schema views. 記述される配列のデータ型記述子の識別子です。他の情報スキーマビューのdtd_identifier列と結合するのに使用してください。

data_type character_data

Data type of the array elements, if it is a built-in type, else <literal>USER-DEFINED</literal> (in that case, the type is identified in <literal>udt_name</literal> and associated columns). 組み込み型の場合は配列要素のデータ型です。さもなくば、USER-DEFINEDです (この場合、型はudt_nameと関連する列で識別されます)。

character_maximum_length cardinal_number

Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname> 常にNULLです。 この情報は、PostgreSQLにおける配列要素のデータ型には当てはまらないからです。

character_octet_length cardinal_number

Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname> 常にNULLです。 この情報は、PostgreSQLにおける配列要素のデータ型には当てはまらないからです。

character_set_catalog sql_identifier

Applies to a feature not available in <productname>PostgreSQL</productname> PostgreSQLでは利用できない機能に適用されるものです。

character_set_schema sql_identifier

Applies to a feature not available in <productname>PostgreSQL</productname> PostgreSQLでは利用できない機能に適用されるものです。

character_set_name sql_identifier

Applies to a feature not available in <productname>PostgreSQL</productname> PostgreSQLでは利用できない機能に適用されるものです。

collation_catalog sql_identifier

Name of the database containing the collation of the element type (always the current database), null if default or the data type of the element is not collatable 要素データ型の照合を含むデータベース(常に現在のデータベース)の名前で、デフォルトであるか要素のデータ型が照合可能でない場合はNULLです。

collation_schema sql_identifier

Name of the schema containing the collation of the element type, null if default or the data type of the element is not collatable 要素データ型の照合を含むスキーマの名前で、デフォルトであるか要素のデータ型が照合可能でない場合はNULLです。

collation_name sql_identifier

Name of the collation of the element type, null if default or the data type of the element is not collatable 要素データ型の照合の名前で、デフォルトであるか要素のデータ型が照合可能でない場合はNULLです。

numeric_precision cardinal_number

Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname> 常にNULLです。 この情報は、PostgreSQLにおける配列要素のデータ型には当てはまらないからです。

numeric_precision_radix cardinal_number

Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname> 常にNULLです。 この情報は、PostgreSQLにおける配列要素のデータ型には当てはまらないからです。

numeric_scale cardinal_number

Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname> 常にNULLです。 この情報は、PostgreSQLにおける配列要素のデータ型には当てはまらないからです。

datetime_precision cardinal_number

Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname> 常にNULLです。 この情報は、PostgreSQLにおける配列要素のデータ型には当てはまらないからです。

interval_type character_data

Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname> 常にNULLです。 この情報は、PostgreSQLにおける配列要素のデータ型には当てはまらないからです。

interval_precision cardinal_number

Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname> 常にNULLです。 この情報は、PostgreSQLにおける配列要素のデータ型には当てはまらないからです。

domain_default character_data

Not yet implemented 未実装です。

udt_catalog sql_identifier

Name of the database that the data type of the elements is defined in (always the current database) 要素のデータ型を定義したデータベースの名前です (常に現在のデータベースです)。

udt_schema sql_identifier

Name of the schema that the data type of the elements is defined in 要素のデータ型を定義したスキーマの名前です。

udt_name sql_identifier

Name of the data type of the elements 要素のデータ型の名前です。

scope_catalog sql_identifier

Applies to a feature not available in <productname>PostgreSQL</productname> PostgreSQLでは利用できない機能に適用されるものです。

scope_schema sql_identifier

Applies to a feature not available in <productname>PostgreSQL</productname> PostgreSQLでは利用できない機能に適用されるものです。

scope_name sql_identifier

Applies to a feature not available in <productname>PostgreSQL</productname> PostgreSQLでは利用できない機能に適用されるものです。

maximum_cardinality cardinal_number

Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname> 常にNULLです。PostgreSQLでは配列の次数は無制限だからです。

dtd_identifier sql_identifier

An identifier of the data type descriptor of the element. This is currently not useful. 要素のデータ型記述子の識別子です。現在は用途はありません。