pg_exec

Name

pg_exec -- send a query string to the backend  -- バックエンドに問い合わせを送信します。

Synopsis

pg_exec dbHandle queryString

**********************************************************

入力

dbHandle

Specifies a valid database handle.

有効なデータベースハンドルを指定します。

queryString

Specifies a valid SQL query.

有効な SQL 問い合わせを指定します。

出力

resultHandle

A Tcl error will be returned if Pgtcl was unable to obtain a backend response. Otherwise, a query result object is created and a handle for it is returned. This handle can be passed to pg_result to obtain the results of the query.

Pgtcl がバックエンドから回答を得ることができなかった場合、Tcl エ ラーが返されます。さもなくば、問い合わせの結果オブジェクトが作成 され、そのハンドルが返されます。このハンドルを pg_result に渡すことで、問い合わせの結果を得 ることができます。

説明

pg_exec submits a query to the Postgres backend and returns a result. Query result handles start with the connection handle and add a period and a result number.

pg_execPostgres バックエンドに問い合わせを送り、その結果を返します。問い合わせ結果の ハンドル名は、接続ハンドル名から始まり、続いて、ピリオド、そして結果 番号が付いたものになります。

Note that lack of a Tcl error is not proof that the query succeeded! An error message returned by the backend will be processed as a query result with failure status, not by generating a Tcl error in pg_exec.

Tcl エラーが無いといっても問い合わせが成功したとは限りません!バック エンドから返されるエラーメッセージは、どんな失敗であったかのステータ スを持った問い合わせ結果として処理されるものであり、pg_exec 内での Tcl エラーによって生成されるものではありません。