-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcatalog-pg-attribute.html
More file actions
128 lines (128 loc) · 15.8 KB
/
Copy pathcatalog-pg-attribute.html
File metadata and controls
128 lines (128 loc) · 15.8 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
<?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>49.7. pg_attribute</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.78.1" /><link rel="home" href="index.html" title="PostgreSQL 9.5.4文書" /><link rel="up" href="catalogs.html" title="第49章 システムカタログ" /><link rel="prev" href="catalog-pg-attrdef.html" title="49.6. pg_attrdef" /><link rel="next" href="catalog-pg-authid.html" title="49.8. pg_authid" /><link rel="copyright" href="legalnotice.html" title="法的告知" /><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.5.4文書</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.5.4 catalog-pg-attribute.html">誤訳等の報告</a></div></td></tr><tr><td width="10%" align="left" valign="top"><a accesskey="p" href="catalog-pg-attrdef.html">前へ</a> </td><td width="10%" align="left" valign="top"><a accesskey="u" href="catalogs.html">上へ</a></td><td width="60%" align="center">49.7. <code class="structname">pg_attribute</code></td><td width="20%" align="right" valign="top"> <a accesskey="n" href="catalog-pg-authid.html">次へ</a></td></tr></table><hr /></div><div class="sect1" id="catalog-pg-attribute"><div class="titlepage"><div><div><h2 class="title" style="clear: both">49.7. <code class="structname">pg_attribute</code></h2></div></div></div><a id="idp111683872" class="indexterm"></a><p><span class="original">
The catalog <structname>pg_attribute</structname> stores information about
table columns. There will be exactly one
<structname>pg_attribute</structname> row for every column in every
table in the database. (There will also be attribute entries for
indexes, and indeed all objects that have <structname>pg_class</structname>
entries.)
</span><code class="structname">pg_attribute</code>カタログにはテーブルの列情報が格納されます。
データベース内のすべてのテーブルの各列に対し必ず1つの<code class="structname">pg_attribute</code>行があります。
(また、インデックスと<code class="structname">pg_class</code>に項目を持つすべてのオブジェクトに対しての属性記述があります。)
</p><p><span class="original">
The term attribute is equivalent to column and is used for
historical reasons.
</span>属性という表現は列と同等の意味で、歴史的背景からそのように呼ばれています。
</p><div class="table" id="idp111687872"><p class="title"><strong>表49.7 <code class="structname">pg_attribute</code>の列</strong></p><div class="table-contents"><span class="original">
<title><structname>pg_attribute</> Columns</title>
</span><table summary="pg_attributeの列" 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">attrelid</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-class.html" title="49.11. pg_class"><code class="structname">pg_class</code></a>.oid</code></td><td>この列が属するテーブル</td></tr><tr><td><code class="structfield">attname</code></td><td><code class="type">name</code></td><td> </td><td>列名</td></tr><tr><td><code class="structfield">atttypid</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-type.html" title="49.54. pg_type"><code class="structname">pg_type</code></a>.oid</code></td><td>この列のデータ型</td></tr><tr><td><code class="structfield">attstattarget</code></td><td><code class="type">int4</code></td><td> </td><td><span class="original">
<structfield>attstattarget</structfield> controls the level of detail
of statistics accumulated for this column by
<xref linkend="sql-analyze">.
A zero value indicates that no statistics should be collected.
A negative value says to use the system default statistics target.
The exact meaning of positive values is data type-dependent.
For scalar data types, <structfield>attstattarget</structfield>
is both the target number of <quote>most common values</quote>
to collect, and the target number of histogram bins to create.
</span><code class="structfield">attstattarget</code>は<a class="xref" href="sql-analyze.html" title="ANALYZE"><span class="refentrytitle">ANALYZE</span></a>によるこの列に対する蓄積された統計情報をどの程度詳しく管理するかを規定します。
値がゼロの場合は統計情報を収集しません。
負の値の場合は、システムのデフォルトの統計目標を使用すべきであるということです。
正の値が厳密に意味するところはデータ型に依存します。
スカラデータ型に対して<code class="structfield">attstattarget</code>は収集する<span class="quote">「<span class="quote">最も一般的な値</span>」</span>の目標となる数であり、また作成する度数分布ビンの目標数でもあります。
</td></tr><tr><td><code class="structfield">attlen</code></td><td><code class="type">int2</code></td><td> </td><td><span class="original">
A copy of <literal>pg_type.typlen</literal> of this column's
type
</span> この列の型の<code class="literal">pg_type.typlen</code>のコピー
</td></tr><tr><td><code class="structfield">attnum</code></td><td><code class="type">int2</code></td><td> </td><td><span class="original">
The number of the column. Ordinary columns are numbered from 1
up. System columns, such as <structfield>oid</structfield>,
have (arbitrary) negative numbers.
</span>列番号。
通常、列は1から始まる番号付けがなされます。
<code class="structfield">OID</code>のようなシステムによる列には(任意の)負の番号が付きます。
</td></tr><tr><td><code class="structfield">attndims</code></td><td><code class="type">int4</code></td><td> </td><td><span class="original">
Number of dimensions, if the column is an array type; otherwise 0.
(Presently, the number of dimensions of an array is not enforced,
so any nonzero value effectively means <quote>it's an array</>.)
</span>列が配列型の場合は次元数を表現し、そうでない時はゼロです。
(現在配列の次元数は強制されていませんのでゼロ以外のどのような値であっても<span class="quote">「<span class="quote">これは配列である</span>」</span>ということを意味します。)
</td></tr><tr><td><code class="structfield">attcacheoff</code></td><td><code class="type">int4</code></td><td> </td><td><span class="original">
Always -1 in storage, but when loaded into a row descriptor
in memory this might be updated to cache the offset of the attribute
within the row
</span>格納時は必ず-1となりますが、メモリ内の行記述子に読み込まれた場合は、行内での属性オフセットをキャッシュするために更新される可能性があります。
</td></tr><tr><td><code class="structfield">atttypmod</code></td><td><code class="type">int4</code></td><td> </td><td><span class="original">
<structfield>atttypmod</structfield> records type-specific data
supplied at table creation time (for example, the maximum
length of a <type>varchar</type> column). It is passed to
type-specific input functions and length coercion functions.
The value will generally be -1 for types that do not need <structfield>atttypmod</>.
</span><code class="structfield">atttypmod</code>は、テーブル作成時に与えられた型固有のデータ(たとえば<code class="type">varchar</code>列の最大長)を記録します。
これは型固有の入力関数や長さ強制関数に渡されます。
<code class="structfield">atttypmod</code>を必要としない型では、通常、この値は-1です。
</td></tr><tr><td><code class="structfield">attbyval</code></td><td><code class="type">bool</code></td><td> </td><td><span class="original">
A copy of <literal>pg_type.typbyval</> of this column's type
</span>この列の型の<code class="literal">pg_type.typbyval</code>のコピー
</td></tr><tr><td><code class="structfield">attstorage</code></td><td><code class="type">char</code></td><td> </td><td><span class="original">
Normally a copy of <literal>pg_type.typstorage</> of this
column's type. For TOAST-able data types, this can be altered
after column creation to control storage policy.
</span>通常、この列の型の<code class="literal">pg_type.typstorage</code>のコピー。
TOAST可能なデータ型では、格納ポリシーを制御するために列の作成後に変更することができます。
</td></tr><tr><td><code class="structfield">attalign</code></td><td><code class="type">char</code></td><td> </td><td><span class="original">
A copy of <literal>pg_type.typalign</> of this column's type
</span>この列の型の<code class="literal">pg_type.typalign</code>のコピー
</td></tr><tr><td><code class="structfield">attnotnull</code></td><td><code class="type">bool</code></td><td> </td><td><span class="original">
This represents a not-null constraint.
</span>非NULL制約を表します。
</td></tr><tr><td><code class="structfield">atthasdef</code></td><td><code class="type">bool</code></td><td> </td><td><span class="original">
This column has a default value, in which case there will be a
corresponding entry in the <structname>pg_attrdef</structname>
catalog that actually defines the value.
</span>この列にはデフォルト値があります。
その場合、実際に値を定義する<code class="structname">pg_attrdef</code>カタログ内に対応する項目があります。
</td></tr><tr><td><code class="structfield">attisdropped</code></td><td><code class="type">bool</code></td><td> </td><td><span class="original">
This column has been dropped and is no longer valid. A dropped
column is still physically present in the table, but is
ignored by the parser and so cannot be accessed via SQL.
</span>この列は既に削除されていて有効ではありません。
削除された列は物理的にはまだテーブル上に存在していますが、パーサによって無視されるためSQLでアクセスすることができません。
</td></tr><tr><td><code class="structfield">attislocal</code></td><td><code class="type">bool</code></td><td> </td><td><span class="original">
This column is defined locally in the relation. Note that a column can
be locally defined and inherited simultaneously.
</span>この列はリレーション内でローカルに定義されます。
列がローカルに定義されると同時に継承される場合もあることに注意してください。
</td></tr><tr><td><code class="structfield">attinhcount</code></td><td><code class="type">int4</code></td><td> </td><td><span class="original">
The number of direct ancestors this column has. A column with a
nonzero number of ancestors cannot be dropped nor renamed.
</span>この列が持つ直接の祖先の数です。
祖先を持っている列の削除や名前は変更はできません。
</td></tr><tr><td><code class="structfield">attcollation</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-collation.html" title="49.12. pg_collation"><code class="structname">pg_collation</code></a>.oid</code></td><td><span class="original">
The defined collation of the column, or zero if the column is
not of a collatable data type.
</span>列で定義された照合順序。列が照合順序の設定ができないデータ型の場合はゼロ
</td></tr><tr><td><code class="structfield">attacl</code></td><td><code class="type">aclitem[]</code></td><td> </td><td><span class="original">
Column-level access privileges, if any have been granted specifically
on this column
</span>この列に特定して付与された場合における、列レベルのアクセス権限
</td></tr><tr><td><code class="structfield">attoptions</code></td><td><code class="type">text[]</code></td><td> </td><td><span class="original">
Attribute-level options, as <quote>keyword=value</> strings
</span><span class="quote">「<span class="quote">keyword=value</span>」</span>文字列のような、属性レベルのオプション
</td></tr><tr><td><code class="structfield">attfdwoptions</code></td><td><code class="type">text[]</code></td><td> </td><td><span class="original">
Attribute-level foreign data wrapper options, as <quote>keyword=value</> strings
</span><span class="quote">「<span class="quote">keyword=value</span>」</span>文字列のような、外部データラッパオプションの属性レベル
</td></tr></tbody></table></div></div><br class="table-break" /><p><span class="original">
In a dropped column's <structname>pg_attribute</structname> entry,
<structfield>atttypid</structfield> is reset to zero, but
<structfield>attlen</structfield> and the other fields copied from
<structname>pg_type</> are still valid. This arrangement is needed
to cope with the situation where the dropped column's data type was
later dropped, and so there is no <structname>pg_type</> row anymore.
<structfield>attlen</structfield> and the other fields can be used
to interpret the contents of a row of the table.
</span>削除された列の<code class="structname">pg_attribute</code>項目では、<code class="structfield">atttypid</code>はゼロにリセットされます。
しかし<code class="structfield">attlen</code>と<code class="structname">pg_type</code>からコピーされた他のフィールドは、有効なままです。
この動作は、削除された列のデータ型が後になって削除されて、<code class="structname">pg_type</code>行が存在しないような状況の場合に必要となります。
<code class="structfield">attlen</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-attrdef.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-authid.html">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">49.6. <code class="structname">pg_attrdef</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html">ホーム</a></td><td width="40%" align="right" valign="top"> 49.8. <code class="structname">pg_authid</code></td></tr></table></div></body></html>