pg_blocking
Prev | 4.4.Asynchronous Query Processing Commands | Next

## pg_blocking

pg_blocking — 接続様式を設定､問う-抑止様式か非抑止様式 Get or set the connection mode - blocking or nonblocking

## Synopsis

    pg_blocking conn ?newSetting?

## 説明 Description

`pg_blocking` は接続の抑止様式を変更するか現在の様式を返す｡ `pg_blocking` changes the blocking mode of a connection, or just gets the current mode.

## 引数 Arguments

`conn`

  The handle of the connection.

`newSetting`

  もし提供されると､新しい抑止様式の Tcl 論理値の設定｡ 1 (又は真値､yes､on)を抑止様式設定に使い､0 (又は偽値､no､off)を 非-抑止様式に使う｡ If supplied, a Tcl boolean value with the new blocking mode setting. Use 1 (or true, yes, or on) to set blocking mode, or 0 (or false, no, or off) for non-blocking mode.

## 返り値 Return Value

もし `newSetting` が提供されると抑止状態を返す: 1 抑止､ 0 非抑止､新しい設定に変更する前の値｡もし､ `newSetting` が提供されないと､現在の抑止状態｡ 　 If `newSetting` is provided, returns the blocking state: 1 if blocking, 0 if non-blocking, before changing to the new setting. If `newSetting` is not provided, returns the current blocking state.

引数の不都合以外の不都合状態はない｡ 　 There are no error conditions other than argument errors.

## 註意 Notes

pg_sendquery の様な非同期問合せ命令を使う為に非抑止接続を設定する必要はない｡更に､非抑止様式は他の pgtcl 命令と伴に試験された事はなく､そこで､非抑止様式を使用する成り行きは知られてない｡ You do not need to set a connection to non-blocking state to use the asynchronous query commands such as pg_sendquery. Furthermore, non-blocking mode has not been tested with other pgtcl commands, so the consequences of using non-blocking mode are generally not known.

この命令は PostgreSQL libpq function `PQsetnonblocking` を使い模擬する｡ This command uses or emulates the PostgreSQL libpq function `PQsetnonblocking`.

Prev | Up | Next
pg_cancelrequest | Home | pg_result_callback