-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcatalog-pg-proc.html
More file actions
131 lines (131 loc) · 19.5 KB
/
Copy pathcatalog-pg-proc.html
File metadata and controls
131 lines (131 loc) · 19.5 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
<?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.37. pg_proc</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-policy.html" title="49.36. pg_policy" /><link rel="next" href="catalog-pg-range.html" title="49.38. pg_range" /><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-proc.html">誤訳等の報告</a></div></td></tr><tr><td width="10%" align="left" valign="top"><a accesskey="p" href="catalog-pg-policy.html">前へ</a> </td><td width="10%" align="left" valign="top"><a accesskey="u" href="catalogs.html">上へ</a></td><td width="60%" align="center">49.37. <code class="structname">pg_proc</code></td><td width="20%" align="right" valign="top"> <a accesskey="n" href="catalog-pg-range.html">次へ</a></td></tr></table><hr /></div><div class="sect1" id="catalog-pg-proc"><div class="titlepage"><div><div><h2 class="title" style="clear: both">49.37. <code class="structname">pg_proc</code></h2></div></div></div><a id="idp112725312" class="indexterm"></a><p><span class="original">
The catalog <structname>pg_proc</> stores information about functions (or procedures).
See <xref linkend="sql-createfunction">
and <xref linkend="xfunc"> for more information.
</span><code class="structname">pg_proc</code>カタログは関数(またはプロシージャ)に関する情報を格納します。
<a class="xref" href="sql-createfunction.html" title="CREATE FUNCTION"><span class="refentrytitle">CREATE FUNCTION</span></a>と<a class="xref" href="xfunc.html" title="35.3. ユーザ定義関数">35.3. ユーザ定義関数</a>を参照してください。
</p><p><span class="original">
The table contains data for aggregate functions as well as plain functions.
If <structfield>proisagg</structfield> is true, there should be a matching
row in <structfield>pg_aggregate</structfield>.
</span>このテーブルには、普通の関数のみならず集約関数も含まれます。
<code class="structfield">proisagg</code>が真なら<code class="structname">pg_aggregate</code>に一致する行があるはずです。
</p><div class="table" id="idp112730416"><p class="title"><strong>表49.37 <code class="structname">pg_proc</code>の列</strong></p><div class="table-contents"><span class="original">
<title><structname>pg_proc</> Columns</title>
</span><table summary="pg_procの列" 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">oid</code></td><td><code class="type">oid</code></td><td> </td><td>行識別子(隠し属性です。明示的に選択しなければなりません)</td></tr><tr><td><code class="structfield">proname</code></td><td><code class="type">name</code></td><td> </td><td>関数名</td></tr><tr><td><code class="structfield">pronamespace</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-namespace.html" title="49.31. pg_namespace"><code class="structname">pg_namespace</code></a>.oid</code></td><td><span class="original">
The OID of the namespace that contains this function
</span> この関数を含む名前空間のOID
</td></tr><tr><td><code class="structfield">proowner</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-authid.html" title="49.8. pg_authid"><code class="structname">pg_authid</code></a>.oid</code></td><td>関数の所有者</td></tr><tr><td><code class="structfield">prolang</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-language.html" title="49.28. pg_language"><code class="structname">pg_language</code></a>.oid</code></td><td>この関数の実装言語または呼び出しインタフェース</td></tr><tr><td><code class="structfield">procost</code></td><td><code class="type">float4</code></td><td> </td><td>推定実行コスト(<a class="xref" href="runtime-config-query.html#guc-cpu-operator-cost">cpu_operator_cost</a>単位です)。
<code class="structfield">proretset</code>の場合は、返される行毎のコストになります。</td></tr><tr><td><code class="structfield">prorows</code></td><td><code class="type">float4</code></td><td> </td><td>結果の推定行数(<code class="structfield">proretset</code>でなければゼロになります)</td></tr><tr><td><code class="structfield">provariadic</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">protransform</code></td><td><code class="type">regproc</code></td><td><code class="literal"><a class="link" href="catalog-pg-proc.html" title="49.37. pg_proc"><code class="structname">pg_proc</code></a>.oid</code></td><td>この関数呼び出しは他の関数により簡略化できます。
(<a class="xref" href="xfunc-c.html#xfunc-transform-functions" title="35.9.11. 変形関数">35.9.11. 変形関数</a>を参照してください)</td></tr><tr><td><code class="structfield">proisagg</code></td><td><code class="type">bool</code></td><td> </td><td>関数は集約関数です。</td></tr><tr><td><code class="structfield">proiswindow</code></td><td><code class="type">bool</code></td><td> </td><td>関数はウィンドウ関数です。</td></tr><tr><td><code class="structfield">prosecdef</code></td><td><code class="type">bool</code></td><td> </td><td> セキュリティ定義の関数(すなわち<span class="quote">「<span class="quote">setuid</span>」</span>関数)
</td></tr><tr><td><code class="structfield">proleakproof</code></td><td><code class="type">bool</code></td><td> </td><td> この関数には副作用がありません。引数に関する情報が戻り値以外から伝わることがありません。
引数の値に依存するエラーを発生する可能性がある関数はすべてリークプルーフ関数ではありません。
</td></tr><tr><td><code class="structfield">proisstrict</code></td><td><code class="type">bool</code></td><td> </td><td><span class="original">
Function returns null if any call argument is null. In that
case the function won't actually be called at all. Functions
that are not <quote>strict</quote> must be prepared to handle
null inputs.
</span>関数は呼び出し引数がNULLの場合にはNULLを返します。
その場合、関数は実際にはまったく呼び出されません。
<span class="quote">「<span class="quote">厳密</span>」</span>ではない関数はNULL値入力を取り扱えるようにしなければいけません。
</td></tr><tr><td><code class="structfield">proretset</code></td><td><code class="type">bool</code></td><td> </td><td> 集合(すなわち指定されたデータ型の複数の値)を返す関数
</td></tr><tr><td><code class="structfield">provolatile</code></td><td><code class="type">char</code></td><td> </td><td><span class="original">
<structfield>provolatile</structfield> tells whether the function's
result depends only on its input arguments, or is affected by outside
factors.
It is <literal>i</literal> for <quote>immutable</> functions,
which always deliver the same result for the same inputs.
It is <literal>s</literal> for <quote>stable</> functions,
whose results (for fixed inputs) do not change within a scan.
It is <literal>v</literal> for <quote>volatile</> functions,
whose results might change at any time. (Use <literal>v</literal> also
for functions with side-effects, so that calls to them cannot get
optimized away.)
</span><code class="structfield">provolatile</code>は、関数の結果が入力引数のみで決定されるか、または外部要素に影響されるかを示します。
<code class="literal">i</code>は<span class="quote">「<span class="quote">immutable(不変)</span>」</span>関数を表し、同じ入力に対し常に同じ結果をもたらします。
<code class="literal">s</code>は<span class="quote">「<span class="quote">stable(安定)</span>」</span>関数を表し、(固定入力に対する)結果はスキャン内で変わりません。
<code class="literal">v</code>は<span class="quote">「<span class="quote">volatile(不安定)</span>」</span>関数を表し、どのような場合にも結果は異なる可能性があります。
(また、副作用を持つ関数に<code class="literal">v</code>を使用することで、その関数に対する呼び出しが最適化で消されないようにできます。)
</td></tr><tr><td><code class="structfield">pronargs</code></td><td><code class="type">int2</code></td><td> </td><td>入力の引数の数</td></tr><tr><td><code class="structfield">pronargdefaults</code></td><td><code class="type">int2</code></td><td> </td><td>デフォルト値を持つ引数の数</td></tr><tr><td><code class="structfield">prorettype</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">proargtypes</code></td><td><code class="type">oidvector</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><span class="original">
An array with the data types of the function arguments. This includes
only input arguments (including <literal>INOUT</literal> and
<literal>VARIADIC</> arguments), and thus represents
the call signature of the function.
</span>関数の引数のデータ型を格納した配列。
これは入力引数(<code class="literal">INOUT</code>と<code class="literal">VARIADIC</code>も含みます)のみを含んでいて、関数の呼び出しシグネチャを表現します。
</td></tr><tr><td><code class="structfield">proallargtypes</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><span class="original">
An array with the data types of the function arguments. This includes
all arguments (including <literal>OUT</literal> and
<literal>INOUT</literal> arguments); however, if all the
arguments are <literal>IN</literal> arguments, this field will be null.
Note that subscripting is 1-based, whereas for historical reasons
<structfield>proargtypes</> is subscripted from 0.
</span>関数の引数のデータ型を格納した配列。
これは(<code class="literal">OUT</code>と<code class="literal">INOUT</code>引数を含んだ)全ての引数を含みます。
しかし、すべての引数が<code class="literal">IN</code>であった場合は、この列はNULLになります。
歴史的な理由から<code class="structfield">proargtypes</code>は0から番号が振られていますが、添字は1から始まっていることに注意してください。
</td></tr><tr><td><code class="structfield">proargmodes</code></td><td><code class="type">char[]</code></td><td> </td><td><span class="original">
An array with the modes of the function arguments, encoded as
<literal>i</literal> for <literal>IN</> arguments,
<literal>o</literal> for <literal>OUT</> arguments,
<literal>b</literal> for <literal>INOUT</> arguments,
<literal>v</literal> for <literal>VARIADIC</> arguments,
<literal>t</literal> for <literal>TABLE</> arguments.
If all the arguments are <literal>IN</literal> arguments,
this field will be null.
Note that subscripts correspond to positions of
<structfield>proallargtypes</> not <structfield>proargtypes</>.
</span>関数の引数のモードを格納した配列。
以下のようにエンコードされています。
<code class="literal">IN</code>引数に対しては<code class="literal">i</code>、
<code class="literal">OUT</code>引数に対しては<code class="literal">o</code>、
<code class="literal">INOUT</code>引数に対しては<code class="literal">b</code>、
<code class="literal">VARIADIC</code>引数に対しては<code class="literal">v</code>、
<code class="literal">TABLE</code>引数に対しては<code class="literal">t</code>。
もしすべての引数が<code class="literal">IN</code>引数であった場合は、この列はNULLとなります。
添字は<code class="structfield">proargtypes</code>ではなく<code class="structfield">proallargtypes</code>の位置に対応していることに注意してください。
</td></tr><tr><td><code class="structfield">proargnames</code></td><td><code class="type">text[]</code></td><td> </td><td><span class="original">
An array with the names of the function arguments.
Arguments without a name are set to empty strings in the array.
If none of the arguments have a name, this field will be null.
Note that subscripts correspond to positions of
<structfield>proallargtypes</> not <structfield>proargtypes</>.
</span>関数の引数名を格納する配列。
名前のない引数は、配列内では空文字列で設定されます。
もしすべての引数に名前がない場合は、この列はNULLとなります。
添字は<code class="structfield">proargtypes</code>ではなく<code class="structfield">proallargtypes</code>の位置に対応していることに注意してください。
</td></tr><tr><td><code class="structfield">proargdefaults</code></td><td><code class="type">pg_node_tree</code></td><td> </td><td>デフォルト値のための(<code class="function">nodeToString()</code>表現の)演算式ツリー。
これは<code class="structfield">pronargdefaults</code>の要素のリストで、最後の<em class="replaceable"><code>N</code></em>個の<span class="emphasis"><em>入力</em></span>引数と対応しています(つまり最後の<em class="replaceable"><code>N</code></em> <code class="structfield">proargtypes</code>の位置ということです)。
もし引数にデフォルト値がない場合は、この列はNULLになります。
</td></tr><tr><td><code class="structfield">protrftypes</code></td><td><code class="type">oid[]</code></td><td> </td><td><span class="original">
Data type OIDs for which to apply transforms.
</span>変換が適用されるデータ型のOID
</td></tr><tr><td><code class="structfield">prosrc</code></td><td><code class="type">text</code></td><td> </td><td><span class="original">
This tells the function handler how to invoke the function. It
might be the actual source code of the function for interpreted
languages, a link symbol, a file name, or just about anything
else, depending on the implementation language/call convention.
</span>関数の起動方法を関数ハンドラに伝えます。
実装言語や呼び出し規約に依存して、使用する言語用の関数の実際のソースコード、リンクシンボル、ファイル名などになります。
</td></tr><tr><td><code class="structfield">probin</code></td><td><code class="type">text</code></td><td> </td><td>関数の起動方法についての追加情報。
同じように解釈は言語に依存します。
</td></tr><tr><td><code class="structfield">proconfig</code></td><td><code class="type">text[]</code></td><td> </td><td>実行時の設定変数に対する関数のローカル設定</td></tr><tr><td><code class="structfield">proacl</code></td><td><code class="type">aclitem[]</code></td><td> </td><td><span class="original">
Access privileges; see
<xref linkend="sql-grant"> and
<xref linkend="sql-revoke">
for details
</span>アクセス権限。
<a class="xref" href="sql-grant.html" title="GRANT"><span class="refentrytitle">GRANT</span></a>と<a class="xref" href="sql-revoke.html" title="REVOKE"><span class="refentrytitle">REVOKE</span></a>を参照してください。
</td></tr></tbody></table></div></div><br class="table-break" /><p><span class="original">
For compiled functions, both built-in and dynamically loaded,
<structfield>prosrc</structfield> contains the function's C-language
name (link symbol). For all other currently-known language types,
<structfield>prosrc</structfield> contains the function's source
text. <structfield>probin</structfield> is unused except for
dynamically-loaded C functions, for which it gives the name of the
shared library file containing the function.
</span>コンパイル言語で作成された、組込みおよび動的にロードされる関数では、<code class="structfield">prosrc</code>は関数のC言語名(リンクシンボル)を持ちます。
他の種類の言語はすべて、<code class="structfield">prosrc</code>は関数のソーステキストを持ちます。
<code class="structfield">probin</code>は動的にロードされるC関数に対してその関数を保有する共有ライブラリファイルの名前を与える以外には使用されていません。
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="catalog-pg-policy.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-range.html">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">49.36. <code class="structname">pg_policy</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html">ホーム</a></td><td width="40%" align="right" valign="top"> 49.38. <code class="structname">pg_range</code></td></tr></table></div></body></html>