-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcatalog-pg-depend.html
More file actions
167 lines (165 loc) · 17.7 KB
/
catalog-pg-depend.html
File metadata and controls
167 lines (165 loc) · 17.7 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?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>52.18. pg_depend</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="catalog-pg-default-acl.html" title="52.17. pg_default_acl" /><link rel="next" href="catalog-pg-description.html" title="52.19. pg_description" /><meta name="viewport" content="width=device-width,initial-scale=1.0" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="4" align="center"><a accesskey="h" href="index.html">PostgreSQL 11.5文書</a></th></tr><tr><td width="10%" align="left"></td><td width="10%" align="left"></td><td width="60%" align="center"><a href="catalogs.html" title="第52章 システムカタログ">第52章 システムカタログ</a></td><td width="20%" align="right"><div class="actions"><a class="issue" title="github" href="https://github.com/pgsql-jp/jpug-doc/issues/new?title=version 11.5 catalog-pg-depend.html">誤訳等の報告
</a></div></td></tr><tr><td width="10%" align="left"><a accesskey="p" href="catalog-pg-default-acl.html" title="52.17. pg_default_acl">前へ</a> </td><td width="10%" align="left"><a accesskey="u" href="catalogs.html" title="第52章 システムカタログ">上へ</a></td><td width="60%" align="center">52.18. <code class="structname">pg_depend</code></td><td width="20%" align="right"> <a accesskey="n" href="catalog-pg-description.html" title="52.19. pg_description">次へ</a></td></tr></table><hr /></div><div class="sect1" id="CATALOG-PG-DEPEND"><div class="titlepage"><div><div><h2 class="title" style="clear: both">52.18. <code class="structname">pg_depend</code></h2></div></div></div><a id="id-1.10.4.20.2" class="indexterm"></a><p>
<span class="original">
The catalog <structname>pg_depend</structname> records the dependency
relationships between database objects. This information allows
<command>DROP</command> commands to find which other objects must be dropped
by <command>DROP CASCADE</command> or prevent dropping in the <command>DROP
RESTRICT</command> case.
</span>
<code class="structname">pg_depend</code>カタログは、データベースオブジェクト間の依存関係を記録します。
この情報によって<code class="command">DROP</code>コマンドが、他のどのオブジェクトを<code class="command">DROP CASCADE</code>で削除する必要があるか、また、<code class="command">DROP RESTRICT</code>で削除を防止するかの場合を判断します。
</p><p>
<span class="original">
See also <link linkend="catalog-pg-shdepend"><structname>pg_shdepend</structname></link>,
which performs a similar function for dependencies involving objects
that are shared across a database cluster.
</span>
<a class="link" href="catalog-pg-shdepend.html" title="52.47. pg_shdepend"><code class="structname">pg_shdepend</code></a>も参照してください。
これはデータベースクラスタ間で共有されるオブジェクトの依存関係に対する似たような機能を持っています。
</p><div class="table" id="id-1.10.4.20.5"><p class="title"><strong>表52.18 <code class="structname">pg_depend</code>の列</strong></p><div class="table-contents"><span class="original">
<title><structname>pg_depend</structname> Columns</title>
</span><table class="table" summary="pg_dependの列" 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">classid</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-class.html" title="52.11. pg_class"><code class="structname">pg_class</code></a>.oid</code></td><td>依存するオブジェクトを含んだシステムカタログのOID</td></tr><tr><td><code class="structfield">objid</code></td><td><code class="type">oid</code></td><td>any OID column</td><td>特定の依存するオブジェクトのOID</td></tr><tr><td><code class="structfield">objsubid</code></td><td><code class="type">int4</code></td><td> </td><td>
<span class="original">
For a table column, this is the column number (the
<structfield>objid</structfield> and <structfield>classid</structfield> refer to the
table itself). For all other object types, this column is
zero.
</span>
テーブル列の場合、これは列番号です(<code class="structfield">objid</code>と<code class="structfield">classid</code>はテーブル自身を参照します)。
他のすべての種類のオブジェクトでは、このフィールドはゼロです。
</td></tr><tr><td><code class="structfield">refclassid</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-class.html" title="52.11. pg_class"><code class="structname">pg_class</code></a>.oid</code></td><td>参照されるオブジェクトが存在するシステムカタログのOID</td></tr><tr><td><code class="structfield">refobjid</code></td><td><code class="type">oid</code></td><td>any OID column</td><td>特定の参照されるオブジェクトのOID</td></tr><tr><td><code class="structfield">refobjsubid</code></td><td><code class="type">int4</code></td><td> </td><td>
<span class="original">
For a table column, this is the column number (the
<structfield>refobjid</structfield> and <structfield>refclassid</structfield> refer
to the table itself). For all other object types, this column
is zero.
</span>
テーブル列の場合、これは列番号です(<code class="structfield">refobjid</code>と<code class="structfield">refclassid</code>はテーブル自身を参照します)。
他のすべての種類のオブジェクトでは、このフィールドはゼロです。
</td></tr><tr><td><code class="structfield">deptype</code></td><td><code class="type">char</code></td><td> </td><td>
<span class="original">
A code defining the specific semantics of this dependency relationship; see text
</span>
この依存関係の特定のセマンティクスを定義するコード(後述)。
</td></tr></tbody></table></div></div><br class="table-break" /><p>
<span class="original">
In all cases, a <structname>pg_depend</structname> entry indicates that the
referenced object cannot be dropped without also dropping the dependent
object. However, there are several subflavors identified by
<structfield>deptype</structfield>:
</span>
すべての場合において、<code class="structname">pg_depend</code>エントリは依存するオブジェクトも削除しない限り、参照されるオブジェクトを削除できないことを示します。
もっとも、<code class="structfield">deptype</code>によって指定される以下のようないくつかのオプションもあります。
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="symbol">DEPENDENCY_NORMAL</code> (<code class="literal">n</code>)</span></dt><dd><p>
<span class="original">
A normal relationship between separately-created objects. The
dependent object can be dropped without affecting the
referenced object. The referenced object can only be dropped
by specifying <literal>CASCADE</literal>, in which case the dependent
object is dropped, too. Example: a table column has a normal
dependency on its data type.
</span>
個別に作成されたオブジェクト間の通常の関係です。
依存するオブジェクトは参照されるオブジェクトに影響を与えずに削除できます。
参照されるオブジェクトは<code class="literal">CASCADE</code>を指定することによってのみ削除することができます。
この場合は依存するオブジェクトも削除されます。
例:テーブルの列はそのデータ型に対して通常の依存関係を持ちます。
</p></dd><dt><span class="term"><code class="symbol">DEPENDENCY_AUTO</code> (<code class="literal">a</code>)</span></dt><dd><p>
<span class="original">
The dependent object can be dropped separately from the
referenced object, and should be automatically dropped
(regardless of <literal>RESTRICT</literal> or <literal>CASCADE</literal>
mode) if the referenced object is dropped. Example: a named
constraint on a table is made autodependent on the table, so
that it will go away if the table is dropped.
</span>
依存するオブジェクトは参照されるオブジェクトから独立して削除することができます。
そして、参照されるオブジェクトが削除される時は(<code class="literal">RESTRICT</code>もしくは<code class="literal">CASCADE</code>モードに関わりなく)依存するオブジェクトも自動的に削除されなければなりません。
例:テーブル上の名前付き制約はテーブル上に自動設定されているため、テーブルが削除されるとなくなります。
</p></dd><dt><span class="term"><code class="symbol">DEPENDENCY_INTERNAL</code> (<code class="literal">i</code>)</span></dt><dd><p>
<span class="original">
The dependent object was created as part of creation of the
referenced object, and is really just a part of its internal
implementation. A <command>DROP</command> of the dependent object
will be disallowed outright (we'll tell the user to issue a
<command>DROP</command> against the referenced object, instead). A
<command>DROP</command> of the referenced object will be propagated
through to drop the dependent object whether
<command>CASCADE</command> is specified or not. Example: a trigger
that's created to enforce a foreign-key constraint is made
internally dependent on the constraint's
<structname>pg_constraint</structname> entry.
</span>
依存するオブジェクトは参照されるオブジェクトの作成時に作成されたもので、実際に内部実装の一部に過ぎません。
依存するオブジェクトに対して<code class="command">DROP</code>コマンドを直接的に実行できません
(その代わりに、参照されるオブジェクトに対して<code class="command">DROP</code>を実行するように指示されます)。
参照されるオブジェクトに<code class="command">DROP</code>を実行すると、<code class="command">CASCADE</code>が指定されているかどうかに関わらず、依存するオブジェクトも削除されます。
例:外部キー制約を強制するために作成されたトリガは内部的に制約の<code class="structname">pg_constraint</code>項目に依存しています。
</p></dd><dt><span class="term"><code class="symbol">DEPENDENCY_INTERNAL_AUTO</code> (<code class="literal">I</code>)</span></dt><dd><p>
<span class="original">
The dependent object was created as part of creation of the
referenced object, and is really just a part of its internal
implementation. A <command>DROP</command> of the dependent object
will be disallowed outright (we'll tell the user to issue a
<command>DROP</command> against the referenced object, instead).
While a regular internal dependency will prevent
the dependent object from being dropped while any such dependencies
remain, <literal>DEPENDENCY_INTERNAL_AUTO</literal> will allow such
a drop as long as the object can be found by following any of such
dependencies.
Example: an index on a partition is made internal-auto-dependent on
both the partition itself as well as on the index on the parent
partitioned table; so the partition index is dropped together with
either the partition it indexes, or with the parent index it is
attached to.
</span>
依存するオブジェクトは参照されるオブジェクトの生成の一環で作成され、実際にはこれは内部的な実装の一部に過ぎません。
依存するオブジェクトの<code class="command">DROP</code>は全面的に禁止されます。
(その代わり参照されるオブジェクトに対して<code class="command">DROP</code>を発行するようにユーザに通告します。)
通常の内部的な依存関係のもとでは、依存するオブジェクトは依存性が残っている限りは削除されませんが、<code class="literal">DEPENDENCY_INTERNAL_AUTO</code>は依存性を追跡する中でそうしたオブジェクトが見つかった場合には削除を許容します。
例をあげます。
パーティション上のインデックスは、パーティション自身とその親パーティションテーブルの両方で内部的自動依存(internal-auto-dependent)となります。
したがって、そのパーティションインデックスは、インデックスが付与されているパーティション自身または付与されている親インデックスのどちらかが削除される際に同時に削除されます。
</p></dd><dt><span class="term"><code class="symbol">DEPENDENCY_EXTENSION</code> (<code class="literal">e</code>)</span></dt><dd><p>
<span class="original">
The dependent object is a member of the <firstterm>extension</firstterm> that is
the referenced object (see
<link linkend="catalog-pg-extension"><structname>pg_extension</structname></link>).
The dependent object can be dropped only via
<command>DROP EXTENSION</command> on the referenced object. Functionally
this dependency type acts the same as an internal dependency, but
it's kept separate for clarity and to simplify <application>pg_dump</application>.
</span>
依存するオブジェクトは参照されるオブジェクトの<em class="firstterm">拡張</em>のメンバです(<a class="link" href="catalog-pg-extension.html" title="52.22. pg_extension"><code class="structname">pg_extension</code></a>参照)。
依存するオブジェクトは参照されるオブジェクトに対する<code class="command">DROP EXTENSION</code>経由でのみ削除することができます。
機能的にはこの種類の依存関係は内部依存関係と同様に動作しますが、明確さと<span class="application">pg_dump</span>を単純化するために別々に保持されます。
</p></dd><dt><span class="term"><code class="symbol">DEPENDENCY_AUTO_EXTENSION</code> (<code class="literal">x</code>)</span></dt><dd><p>
<span class="original">
The dependent object is not a member of the extension that is the
referenced object (and so should not be ignored by pg_dump), but
cannot function without it and should be dropped when the
extension itself is. The dependent object may be dropped on its
own as well.
</span>
依存するオブジェクトは参照されるオブジェクトの拡張のメンバではありません(そしてそれゆえpg_dumpによって無視されません)が、参照されるオブジェクトなしに機能することが出来ず、拡張自体が削除される時に削除されるでしょう。
依存するオブジェクトは、同様にそれ自身で削除されるかもしれません。
</p></dd><dt><span class="term"><code class="symbol">DEPENDENCY_PIN</code> (<code class="literal">p</code>)</span></dt><dd><p>
<span class="original">
There is no dependent object; this type of entry is a signal
that the system itself depends on the referenced object, and so
that object must never be deleted. Entries of this type are
created only by <command>initdb</command>. The columns for the
dependent object contain zeroes.
</span>
依存するオブジェクトはありません。
この種類の項目は、参照されるオブジェクトにシステム自体が依存し、したがってオブジェクトを絶対に削除してはならないことを示します。
この種類の項目は<code class="command">initdb</code>の実行時にのみ作成されます。
依存するオブジェクト列にはゼロが含まれます。
</p></dd></dl></div><p>
<span class="original">
Other dependency flavors might be needed in future.
</span>
将来的に、他の依存関係のオプションが必要になる可能性があります。
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="catalog-pg-default-acl.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-description.html">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">52.17. <code class="structname">pg_default_acl</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html">ホーム</a></td><td width="40%" align="right" valign="top"> 52.19. <code class="structname">pg_description</code></td></tr></table></div></body></html>