問い合わせ実行関数

44) Once a connection to a database server has been successfully established, the functions described here are used to perform SQL queries and commands.

いったんデータベースサーバへの接続の確立が成功すれば,あとは このセクションで説明する関数を使って SQL の問い合わせやコマンドを実行します.

47) The PGresult structure encapsulates the query result returned by the backend. libpq application programmers should be careful to maintain the PGresult abstraction. Use the accessor functions below to get at the contents of PGresult. Avoid directly referencing the fields of the PGresult structure because they are subject to change in the future. (Beginning in Postgres release 6.4, the definition of struct PGresult is not even provided in libpq-fe.h. If you have old code that accesses PGresult fields directly, you can keep using it by including libpq-int.h too, but you are encouraged to fix the code soon.)

PGresult 構造体はバックエンドから返された問い合わせ結果をカプセル化したものです. libpq アプリケーションプログラマは PGresult による抽象化に注意を払うべきです. PGresult の内容は以下に挙げるアクセッサ関数を使って取り出してください. PGresult 構造体中のフィールドは将来予告なく変更されることがあります. ですから直接フィールドを参照することは避けてください. (Postgres リリース 6.4 の初期の段階から, PGresult 構造体の定義を libpq-fe.h の中から外しました) 以前作成したプログラムが PGresult のフィールドを直接操作している場合, libpq-int.h をインクルードすれば使い続けることができます. しかしそのプログラムは是非とも修正してください.