pg_on_connection_loss
Prev | 4.5.Notification and Notice Processing Commands | Next

## pg_on_connection_loss

pg_on_connection_loss — 予想外の接続損失に関する呼戻しを設定する Set a callback for unexpected connection loss

## Synopsis

    pg_on_connection_loss conn ?callbackCommand?

## Description

pg_on_connection_loss は､データベースへの接続に予想外の損失が生じると､呼戻し命令を実行する要求を､ 生成する､か､変更する､か､取消す｡ `callbackCommand` 假引数により､要求が確立し､又は､既存の命令文字列 `pg_on_connection_loss` creates, changes, or cancels a request to execute a callback command if an unexpected loss of connection to the database occurs. With a `callbackCommand` parameter, the request is established, or the command string of an already existing request is replaced. With no `callbackCommand` parameter, a prior request is canceled.

呼戻し命令は､Tcl 暇循環から実行される｡ これは､Tkを伴って書かれた応用譜の暇状態である｡ Tkなしのtcl殻内では､入るべき暇循環を惹き起す為にupdate や vwait を実行できる｡ The callback command string is executed from the Tcl idle loop. That is the normal idle state of an application written with Tk. In non-Tk Tcl shells, you can execute `update` or `vwait` to cause the idle loop to be entered.

## Arguments

`conn`

  接続損失を監視する為の接続の把持子｡ The handle of the connection to watch for connection losses.

`callbackCommand`

  もし存在すると､接続損失が検出された時に実行すべき命令文字列を提供する｡ 存在しないと､接続損失の為の既存の命令は取消される｡ If present, provides the command string to execute when connection loss is detected. If absent, an existing command string for connection loss is canceled.

## Return Value

なし｡ もし不都合が生じるとtcl不都合が発せられる｡ Nothing. Throws a Tcl error if an error occurs.

## Notes

この命令は pgintcl 内では利用できない｡ This command is not available in pgintcl.

Prev | Up | Next
pg_listen | Home | pg_notice_handler