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

44.11. PL/Tclの設定 #

<title>PL/Tcl Configuration</title>

This section lists configuration parameters that affect <application>PL/Tcl</application>. この節では、PL/Tclに影響がある設定パラメータを列挙します。

pltcl.start_proc (string) #

This parameter, if set to a nonempty string, specifies the name (possibly schema-qualified) of a parameterless PL/Tcl function that is to be executed whenever a new Tcl interpreter is created for PL/Tcl. Such a function can perform per-session initialization, such as loading additional Tcl code. A new Tcl interpreter is created when a PL/Tcl function is first executed in a database session, or when an additional interpreter has to be created because a PL/Tcl function is called by a new SQL role. このパラメータが空文字以外に設定された場合、PL/Tclのための新しいTclインタプリタが作成された際に実行すべきパラメータなしのPL/Tcl関数の名前(スキーマ修飾される場合もあります)を指定します。 そうした関数は、追加のTclコードをロードするような、Tclセッションごとの初期化を実施できます。 データベースセッションの中で新しいPL/Tcl関数が最初に実行された際、あるいはPL/Tcl関数が新しいロールから呼び出されたためにインタプリタを追加で作成しなければならない際に、新しいTclインタプリタが作られます。

The referenced function must be written in the <literal>pltcl</literal> language, and must not be marked <literal>SECURITY DEFINER</literal>. (These restrictions ensure that it runs in the interpreter it's supposed to initialize.) The current user must have permission to call it, too. 参照されている関数はpltcl言語で記述しなければならず、またSECURITY DEFINERとしてマークされていてはいけません。 (この制約により、その関数が初期化すると想定しているインタプリタ内で実行されることが保証されます。) また、現在のユーザはその関数を呼び出すことが許可されていなければなりません。

If the function fails with an error it will abort the function call that caused the new interpreter to be created and propagate out to the calling query, causing the current transaction or subtransaction to be aborted. Any actions already done within Tcl won't be undone; however, that interpreter won't be used again. If the language is used again the initialization will be attempted again within a fresh Tcl interpreter. 関数がエラーで失敗すると、関数呼び出しをアボートし、その結果新しいインタプリタが作成され、エラーは呼び出し元のクエリに伝搬し、現在のトランザクションあるいはサブトランザクションがアボートします。 Tcl内でそれまでに行われた操作は取り消されません。 しかし、インタプリタは再使用できません。 言語が再び使用されると、新しいTclインタプリタ内で初期化が再び試みられます。

Only superusers can change this setting. Although this setting can be changed within a session, such changes will not affect Tcl interpreters that have already been created. スーパーユーザだけがこの設定を変更できます。 この設定はセッション内で変更できますが、すでに作成されたTclインタプリタには影響しません。

pltclu.start_proc (string) #

This parameter is exactly like <varname>pltcl.start_proc</varname>, except that it applies to PL/TclU. The referenced function must be written in the <literal>pltclu</literal> language. このパラメータはPL/TclUに適用される点を除けば、pltcl.start_procと完全に類似しています。 参照される関数はpltclu言語で書かれていなければなりません。