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

37.6. attributes #

The view <literal>attributes</literal> contains information about the attributes of composite data types defined in the database. (Note that the view does not give information about table columns, which are sometimes called attributes in PostgreSQL contexts.) Only those attributes are shown that the current user has access to (by way of being the owner of or having some privilege on the type). attributesビューには、データベース内で定義された複合データ型の属性に関する情報が含まれます。 (このビューが、PostgreSQLコンテキスト内でよく呼び出される属性である、テーブル列に関する情報を持たない点に注意してください。) 現在のユーザが(所有者であるかまたは複合データ型に対する権限を持っていて)アクセスする権限を持つ属性のみが表示されます。

表37.4 attributesの列

<title><structname>attributes</structname> Columns</title>

Column Type 列 型

Description 説明

udt_catalog sql_identifier

Name of the database containing the data type (always the current database) データ型を含むデータベースの名前です(常に現在のデータベースです)。

udt_schema sql_identifier

Name of the schema containing the data type データ型を含むスキーマの名前です。

udt_name sql_identifier

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

attribute_name sql_identifier

Name of the attribute 属性の名前です。

ordinal_position cardinal_number

Ordinal position of the attribute within the data type (count starts at 1) データ型の属性の序数位置です(1から始まります)。

attribute_default character_data

Default expression of the attribute 属性のデフォルト式です。

is_nullable yes_or_no

<literal>YES</literal> if the attribute is possibly nullable, <literal>NO</literal> if it is known not nullable. 属性がNULLを持つことができる場合はYES、さもなくばNOです。

data_type character_data

Data type of the attribute, if it is a built-in type, or <literal>ARRAY</literal> if it is some array (in that case, see the view <literal>element_types</literal>), else <literal>USER-DEFINED</literal> (in that case, the type is identified in <literal>attribute_udt_name</literal> and associated columns). 属性のデータ型が組み込み型の場合、そのデータ型です。 何らかの配列の場合、ARRAYです。 (この場合、element_typesビューを参照してください。) さもなくばUSER-DEFINEDです。 (この場合、型はattribute_udt_nameと関連する列により識別されます。)

character_maximum_length cardinal_number

If <literal>data_type</literal> identifies a character or bit string type, the declared maximum length; null for all other data types or if no maximum length was declared. data_typeが文字列またはビット列と識別される場合、その宣言された最大長です。 他のデータ型または最大長が宣言されていない場合はNULLです。

character_octet_length cardinal_number

If <literal>data_type</literal> identifies a character type, the maximum possible length in octets (bytes) of a datum; null for all other data types. The maximum octet length depends on the declared character maximum length (see above) and the server encoding. data_typeが文字列と識別される場合、オクテット(バイト)単位で表したデータの最大長です。 他のデータ型ではNULLです。 最大オクテット長は宣言された文字最大長(上述)とサーバ符号化方式に依存します。

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 attribute (always the current database), null if default or the data type of the attribute is not collatable 属性の照合を含むデータベース(常に現在のデータベース)の名前で、デフォルトであるか属性のデータ型が照合可能でない場合はNULLです。

collation_schema sql_identifier

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

collation_name sql_identifier

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

numeric_precision cardinal_number

If <literal>data_type</literal> identifies a numeric type, this column contains the (declared or implicit) precision of the type for this attribute. The precision indicates the number of significant digits. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column <literal>numeric_precision_radix</literal>. For all other data types, this column is null. data_typeが数値型と識別される場合、この列は属性の型の(宣言された、あるいは暗黙的な)精度です。 この精度は有効桁を意味します。 numeric_precision_radix列の指定に従って、(10を基とした)10進数、または(2を基とした)2進数表記で表現されます。 他の全ての型の場合では、この列はNULLです。

numeric_precision_radix cardinal_number

If <literal>data_type</literal> identifies a numeric type, this column indicates in which base the values in the columns <literal>numeric_precision</literal> and <literal>numeric_scale</literal> are expressed. The value is either 2 or 10. For all other data types, this column is null. data_typeが数値型と識別される場合、この列は、numeric_precisionおよびnumeric_scaleで表現される値の基が何かを示します。 この値は2または10です。 他の全ての型の場合では、この列はNULLです。

numeric_scale cardinal_number

If <literal>data_type</literal> identifies an exact numeric type, this column contains the (declared or implicit) scale of the type for this attribute. The scale indicates the number of significant digits to the right of the decimal point. It can be expressed in decimal (base 10) or binary (base 2) terms, as specified in the column <literal>numeric_precision_radix</literal>. For all other data types, this column is null. data_typeが数値型と識別される場合、この列は、属性の型の(宣言された、あるいは暗黙的な)位取りが含まれます。 位取りは小数点以下の有効桁数を意味します。 numeric_precision_radix列の指定に従って、(10を基とした)10進数、または(2を基とした)2進数表記で表現されます。 他の全ての型の場合では、この列はNULLです。

datetime_precision cardinal_number

If <literal>data_type</literal> identifies a date, time, timestamp, or interval type, this column contains the (declared or implicit) fractional seconds precision of the type for this attribute, that is, the number of decimal digits maintained following the decimal point in the seconds value. For all other data types, this column is null. data_typeが日付、時刻、タイムスタンプ、または間隔型と識別される場合、この列は(宣言されたか暗黙的な)この属性に対する分数秒精度を包含します。 つまり、秒の値の小数点に続く保存された10進桁数です。 他の全ての型の場合では、この列はNULLです。

interval_type character_data

If <literal>data_type</literal> identifies an interval type, this column contains the specification which fields the intervals include for this attribute, e.g., <literal>YEAR TO MONTH</literal>, <literal>DAY TO SECOND</literal>, etc. If no field restrictions were specified (that is, the interval accepts all fields), and for all other data types, this field is null. data_typeが時間間隔型と識別される場合、この列はこの属性の時間間隔値がどのフィールドを含むかの仕様を含みます。例えば、YEAR TO MONTHDAY TO SECONDなどです。 もしフィールド制約が指定されていない(時間間隔が全てのフィールドを受け付ける)場合や、他の全てのデータ型の場合はこのフィールドはNULLです。

interval_precision cardinal_number

Applies to a feature not available in <productname>PostgreSQL</productname> (see <literal>datetime_precision</literal> for the fractional seconds precision of interval type attributes) PostgreSQLで利用できない機能に適用されるものです。(インターバル型の属性の秒未満の精度についてはdatetime_precisionを参照してください)

attribute_udt_catalog sql_identifier

Name of the database that the attribute data type is defined in (always the current database) 属性のデータ型が定義されたデータベースの名前です (常に現在のデータベースです)。

attribute_udt_schema sql_identifier

Name of the schema that the attribute data type is defined in 属性のデータ型が定義されたスキーマの名前です。

attribute_udt_name sql_identifier

Name of the attribute data type 属性のデータ型の名前です。

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 column, unique among the data type descriptors pertaining to the table. This is mainly useful for joining with other instances of such identifiers. (The specific format of the identifier is not defined and not guaranteed to remain the same in future versions.) 列のデータ型記述子の、テーブルに属するデータ型記述子内で一意な識別子です。 この識別子のインスタンスを結合する時に、主に有用です。 (識別子の書式仕様は定義されておらず、今後のバージョンで同一性を維持する保証もありません。)

is_derived_reference_attribute yes_or_no

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


See also under <xref linkend="infoschema-columns"/>, a similarly structured view, for further information on some of the columns. 後述の37.17も参照してください。 ビューの構造が似ていますし、一部の列では更なる情報も記載されています。