1+ < ?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+ <!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 > F.1. adminpack — pgAdminサポートツールパック</ 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 Vsnapshot " /> < link rel ="prev " href ="contrib.html " title ="付録F 追加で提供されるモジュールと拡張 " /> < link rel ="next " href ="amcheck.html " title ="F.2. amcheck — テーブルとインデックスの一貫性を検査するツール " /> < meta name ="viewport " content ="width=device-width,initial-scale=1.0 " /> </ head > < body id ="docContent " class ="container-fluid col-10 "> < div class ="other_version "> < a href ="https://www.postgresql.jp/document/ "> バージョンごとのドキュメント一覧</ a > </ div > < div class ="navheader "> < table width ="100% " summary ="Navigation header "> < tr > < th colspan ="4 " align ="center "> < a accesskey ="h " href ="index.html "> PostgreSQL 16.4文書</ a > </ th > </ tr > < tr > < td width ="10% " align ="left "> </ td > < td width ="10% " align ="left "> </ td > < td width ="60% " align ="center "> < a href ="contrib.html " title ="付録F 追加で提供されるモジュールと拡張 "> 付録F 追加で提供されるモジュールと拡張</ 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?template=bug_report.yml&what-happened=version 16.4 : adminpack.html "> 誤訳等の報告
3+ </ a > </ div > </ td > </ tr > < tr > < td width ="10% " align ="left "> < a accesskey ="p " href ="contrib.html " title ="付録F 追加で提供されるモジュールと拡張 "> 前へ</ a > </ td > < td width ="10% " align ="left "> < a accesskey ="u " href ="contrib.html " title ="付録F 追加で提供されるモジュールと拡張 "> 上へ</ a > </ td > < td width ="60% " align ="center "> F.1. adminpack — pgAdminサポートツールパック</ td > < td width ="20% " align ="right "> < a accesskey ="n " href ="amcheck.html " title ="F.2. amcheck — テーブルとインデックスの一貫性を検査するツール "> 次へ</ a > </ td > </ tr > </ table > < hr /> </ div > < div class ="sect1 " id ="ADMINPACK "> < div class ="titlepage "> < div > < div > < h2 class ="title " style ="clear: both "> F.1. adminpack — pgAdminサポートツールパック < a href ="#ADMINPACK " class ="id_link "> #</ a > </ h2 > </ div > </ div > </ div > < span class ="original ">
4+ <title>adminpack &mdash; pgAdmin support toolpack</title>
5+ </ span > < a id ="id-1.11.7.11.2 " class ="indexterm "> </ a > < p >
6+ < span class ="original ">
7+ <filename>adminpack</filename> provides a number of support functions which
8+ <application>pgAdmin</application> and other administration and management tools can
9+ use to provide additional functionality, such as remote management
10+ of server log files.
11+ Use of all these functions is only allowed to database superusers by default, but may be
12+ allowed to other users by using the <command>GRANT</command> command.
13+ </ span >
14+ < code class ="filename "> adminpack</ code > は、< span class ="application "> pgAdmin</ span > やその他の管理・運用ツールがサーバログファイルの遠隔管理を行うなどの、追加的な機能を提供できるようにするための数多くのサポート関数を提供します。
15+ デフォルトでは、この関数の使用はすべてデータベーススーパーユーザに限定されていますが、< code class ="command "> GRANT</ code > コマンドを使用して他のユーザーに許可されている場合があります。
16+ </ p > < p >
17+ < span class ="original ">
18+ The functions shown in <xref linkend="functions-adminpack-table"/> provide
19+ write access to files on the machine hosting the server. (See also the
20+ functions in <xref linkend="functions-admin-genfile-table"/>, which
21+ provide read-only access.)
22+ Only files within the database cluster directory can be accessed, unless the
23+ user is a superuser or given privileges of one of the
24+ <literal>pg_read_server_files</literal> or
25+ <literal>pg_write_server_files</literal> roles, as appropriate for the
26+ function, but either a relative or absolute path is allowable.
27+ </ span >
28+ < a class ="xref " href ="adminpack.html#FUNCTIONS-ADMINPACK-TABLE " title ="表F.1 adminpack関数 "> 表 F.1</ a > に示す関数はサーバをホスティングしているマシン上のファイルに対して書き込みアクセスを提供します。
29+ (< a class ="xref " href ="functions-admin.html#FUNCTIONS-ADMIN-GENFILE-TABLE " title ="表9.101 汎用ファイルアクセス関数 "> 表 9.101</ a > の関数も参照してください。そちらは読み取り専用アクセスを提供します。)
30+ ユーザがスーパーユーザか、関数に応じた< code class ="literal "> pg_read_server_files</ code > 、または< code class ="literal "> pg_write_server_files</ code > ロールのいずれかの権限を与えられていない限り、データベースクラスタディレクトリ内のファイルにのみアクセス可能です。
31+ ただし、相対パスと絶対パスのどちらも利用できます。
32+ </ p > < div class ="table " id ="FUNCTIONS-ADMINPACK-TABLE "> < p class ="title "> < strong > 表F.1 < code class ="filename "> adminpack</ code > 関数</ strong > </ p > < div class ="table-contents "> < span class ="original ">
33+ <title><filename>adminpack</filename> Functions</title>
34+ </ span > < table class ="table " summary ="adminpack関数 " border ="1 "> < colgroup > < col /> </ colgroup > < thead > < tr > < th class ="func_table_entry "> < p class ="func_signature ">
35+ < span class ="original ">
36+ Function
37+ </ span >
38+ 関数
39+ </ p >
40+ < p >
41+ < span class ="original ">
42+ Description
43+ </ span >
44+ 説明
45+ </ p > </ th > </ tr > </ thead > < tbody > < tr > < td class ="func_table_entry "> < p class ="func_signature ">
46+ < code class ="function "> pg_catalog.pg_file_write</ code > ( < em class ="parameter "> < code > filename</ code > </ em > < code class ="type "> text</ code > , < em class ="parameter "> < code > data</ code > </ em > < code class ="type "> text</ code > , < em class ="parameter "> < code > append</ code > </ em > < code class ="type "> boolean</ code > )
47+ → < code class ="returnvalue "> bigint</ code >
48+ </ p >
49+ < p >
50+ < span class ="original ">
51+ Writes, or appends to, a text file.
52+ </ span >
53+ テキストファイルに書き込む、または追記する
54+ </ p > </ td > </ tr > < tr > < td class ="func_table_entry "> < p class ="func_signature ">
55+ < code class ="function "> pg_catalog.pg_file_sync</ code > ( < em class ="parameter "> < code > filename</ code > </ em > < code class ="type "> text</ code > )
56+ → < code class ="returnvalue "> void</ code >
57+ </ p >
58+ < p >
59+ < span class ="original ">
60+ Flushes a file or directory to disk.
61+ </ span >
62+ ファイルまたはディレクトリをディスクにフラッシュする
63+ </ p > </ td > </ tr > < tr > < td class ="func_table_entry "> < p class ="func_signature ">
64+ < code class ="function "> pg_catalog.pg_file_rename</ code > ( < em class ="parameter "> < code > oldname</ code > </ em > < code class ="type "> text</ code > , < em class ="parameter "> < code > newname</ code > </ em > < code class ="type "> text</ code > [< span class ="optional "> , < em class ="parameter "> < code > archivename</ code > </ em > < code class ="type "> text</ code > </ span > ] )
65+ → < code class ="returnvalue "> boolean</ code >
66+ </ p >
67+ < p >
68+ < span class ="original ">
69+ Renames a file.
70+ </ span >
71+ ファイル名を変更する
72+ </ p > </ td > </ tr > < tr > < td class ="func_table_entry "> < p class ="func_signature ">
73+ < code class ="function "> pg_catalog.pg_file_unlink</ code > ( < em class ="parameter "> < code > filename</ code > </ em > < code class ="type "> text</ code > )
74+ → < code class ="returnvalue "> boolean</ code >
75+ </ p >
76+ < p >
77+ < span class ="original ">
78+ Removes a file.
79+ </ span >
80+ ファイルを削除する
81+ </ p > </ td > </ tr > < tr > < td class ="func_table_entry "> < p class ="func_signature ">
82+ < code class ="function "> pg_catalog.pg_logdir_ls</ code > ()
83+ → < code class ="returnvalue "> setof record</ code >
84+ </ p >
85+ < p >
86+ < span class ="original ">
87+ Lists the log files in the <varname>log_directory</varname> directory.
88+ </ span >
89+ < code class ="varname "> log_directory</ code > ディレクトリ内のログファイルの一覧を表示する
90+ </ p > </ td > </ tr > </ tbody > </ table > </ div > </ div > < br class ="table-break " /> < a id ="id-1.11.7.11.6 " class ="indexterm "> </ a > < p >
91+ < span class ="original ">
92+ <function>pg_file_write</function> writes the specified <parameter>data</parameter> into
93+ the file named by <parameter>filename</parameter>. If <parameter>append</parameter> is
94+ false, the file must not already exist. If <parameter>append</parameter> is true,
95+ the file can already exist, and will be appended to if so.
96+ Returns the number of bytes written.
97+ </ span >
98+ < code class ="function "> pg_file_write</ code > は指定された< em class ="parameter "> < code > data</ code > </ em > を< em class ="parameter "> < code > filename</ code > </ em > で指定されたファイルに書き込みます
99+ < em class ="parameter "> < code > append</ code > </ em > が偽であれば、ファイルは既に存在していてはいけません。
100+ < em class ="parameter "> < code > append</ code > </ em > が真であれば、ファイルが既に存在していても構いません。その場合、追記されます。
101+ 書き込んだバイト数を返します。
102+ </ p > < a id ="id-1.11.7.11.8 " class ="indexterm "> </ a > < p >
103+ < span class ="original ">
104+ <function>pg_file_sync</function> fsyncs the specified file or directory
105+ named by <parameter>filename</parameter>. An error is thrown
106+ on failure (e.g., the specified file is not present). Note that
107+ <xref linkend="guc-data-sync-retry"/> has no effect on this function,
108+ and therefore a PANIC-level error will not be raised even on failure to
109+ flush database files.
110+ </ span >
111+ < code class ="function "> pg_file_sync</ code > は< em class ="parameter "> < code > filename</ code > </ em > で指定されたファイルまたはディレクトリをfsyncします。
112+ (例えば、指定されたファイルが存在しないなど)失敗するとエラーを発生します。
113+ < a class ="xref " href ="runtime-config-error-handling.html#GUC-DATA-SYNC-RETRY "> data_sync_retry</ a > はこの関数には影響しませんので、データベースファイルのフラッシュの失敗であってもPANICレベルのエラーは起こらないことに注意してください。
114+ </ p > < a id ="id-1.11.7.11.10 " class ="indexterm "> </ a > < p >
115+ < span class ="original ">
116+ <function>pg_file_rename</function> renames a file. If <parameter>archivename</parameter>
117+ is omitted or NULL, it simply renames <parameter>oldname</parameter>
118+ to <parameter>newname</parameter> (which must not already exist).
119+ If <parameter>archivename</parameter> is provided, it first
120+ renames <parameter>newname</parameter> to <parameter>archivename</parameter> (which must
121+ not already exist), and then renames <parameter>oldname</parameter>
122+ to <parameter>newname</parameter>. In event of failure of the second rename step,
123+ it will try to rename <parameter>archivename</parameter> back
124+ to <parameter>newname</parameter> before reporting the error.
125+ Returns true on success, false if the source file(s) are not present or
126+ not writable; other cases throw errors.
127+ </ span >
128+ < code class ="function "> pg_file_rename</ code > はファイルの名前を変更します。
129+ < em class ="parameter "> < code > archivename</ code > </ em > が省略されたり、NULLである場合は、単純に< em class ="parameter "> < code > oldname</ code > </ em > を< em class ="parameter "> < code > newname</ code > </ em > (既に存在していてはいけません)に変更します。
130+ < em class ="parameter "> < code > archivename</ code > </ em > が指定されていれば、まず< em class ="parameter "> < code > newname</ code > </ em > を< em class ="parameter "> < code > archivename</ code > </ em > (既に存在していてはいけません)に変更し、それから< em class ="parameter "> < code > oldname</ code > </ em > を< em class ="parameter "> < code > newname</ code > </ em > に変更します。
131+ 第2段階の名前の変更が失敗した場合には、エラーを報告する前に< em class ="parameter "> < code > archivename</ code > </ em > を< em class ="parameter "> < code > newname</ code > </ em > に戻そうとします。
132+ 成功した場合には真を、元のファイルが存在しなかったり、書き込みできなかった場合には偽を返します。その他の場合にはエラーを発生します。
133+ </ p > < a id ="id-1.11.7.11.12 " class ="indexterm "> </ a > < p >
134+ < span class ="original ">
135+ <function>pg_file_unlink</function> removes the specified file.
136+ Returns true on success, false if the specified file is not present
137+ or the <function>unlink()</function> call fails; other cases throw errors.
138+ </ span >
139+ < code class ="function "> pg_file_unlink</ code > は指定されたファイルを削除します。
140+ 成功した場合には真を、指定されたファイルが存在しなかったり、< code class ="function "> unlink()</ code > の呼出しが失敗した場合には偽を返します。その他の場合にはエラーを発生します。
141+ </ p > < a id ="id-1.11.7.11.14 " class ="indexterm "> </ a > < p >
142+ < span class ="original ">
143+ <function>pg_logdir_ls</function> returns the start timestamps and path
144+ names of all the log files in the <xref linkend="guc-log-directory"/>
145+ directory. The <xref linkend="guc-log-filename"/> parameter must have its
146+ default setting (<literal>postgresql-%Y-%m-%d_%H%M%S.log</literal>) to use this
147+ function.
148+ </ span >
149+ < code class ="function "> pg_logdir_ls</ code > は< a class ="xref " href ="runtime-config-logging.html#GUC-LOG-DIRECTORY "> log_directory</ a > ディレクトリ内にあるログファイルすべての開始時のタイムスタンプとパス名を返します。
150+ この関数を使うには、< a class ="xref " href ="runtime-config-logging.html#GUC-LOG-FILENAME "> log_filename</ a > パラメータはデフォルト設定(< code class ="literal "> postgresql-%Y-%m-%d_%H%M%S.log</ code > )でなければなりません。
151+ </ p > </ div > < div class ="navfooter "> < hr /> < table width ="100% " summary ="Navigation footer "> < tr > < td width ="40% " align ="left "> < a accesskey ="p " href ="contrib.html " title ="付録F 追加で提供されるモジュールと拡張 "> 前へ</ a > </ td > < td width ="20% " align ="center "> < a accesskey ="u " href ="contrib.html " title ="付録F 追加で提供されるモジュールと拡張 "> 上へ</ a > </ td > < td width ="40% " align ="right "> < a accesskey ="n " href ="amcheck.html " title ="F.2. amcheck — テーブルとインデックスの一貫性を検査するツール "> 次へ</ a > </ td > </ tr > < tr > < td width ="40% " align ="left " valign ="top "> 付録F 追加で提供されるモジュールと拡張 </ td > < td width ="20% " align ="center "> < a accesskey ="h " href ="index.html " title ="PostgreSQL 16.4文書 "> ホーム</ a > </ td > < td width ="40% " align ="right " valign ="top "> F.2. amcheck — テーブルとインデックスの一貫性を検査するツール</ td > </ tr > </ table > </ div > </ body > </ html >
0 commit comments