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

55.7. メッセージの書式 #

<title>Message Formats</title>

This section describes the detailed format of each message. Each is marked to indicate that it can be sent by a frontend (F), a backend (B), or both (F &amp; B). Notice that although each message includes a byte count at the beginning, the message format is defined so that the message end can be found without reference to the byte count. This aids validity checking. (The CopyData message is an exception, because it forms part of a data stream; the contents of any individual CopyData message cannot be interpretable on their own.) 本節ではそれぞれのメッセージの詳細書式について説明します。 それぞれにはフロントエンド(F)、バックエンド(B)あるいは双方(F & B)から送出されることを示す印が付いています。 各メッセージには先頭にバイト数を持っていますが、バイト数を参照しなくてもメッセージの終わりを検知できるようにメッセージ書式は定義されています。 これは有効性検査を補助します。 (CopyDataメッセージはデータストリームの一部を形成しますので例外です。 個々のCopyDataメッセージの内容は自身でも解釈することができません。)

AuthenticationOk (B) #
Byte1('R')

Identifies the message as an authentication request. 認証要求としてメッセージを識別します。

Int32(8)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(0)

Specifies that the authentication was successful. 認証が成功したことを指定します。

AuthenticationKerberosV5 (B) #
Byte1('R')

Identifies the message as an authentication request. 認証要求としてメッセージを識別します。

Int32(8)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(2)

Specifies that Kerberos V5 authentication is required. Kerberos V5認証が必要であることを指定します。

AuthenticationCleartextPassword (B) #
Byte1('R')

Identifies the message as an authentication request. 認証要求としてメッセージを識別します。

Int32(8)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(3)

Specifies that a clear-text password is required. 平文パスワードが必要であることを指定します。

AuthenticationMD5Password (B) #
Byte1('R')

Identifies the message as an authentication request. 認証要求としてメッセージを識別します。

Int32(12)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(5)

Specifies that an MD5-encrypted password is required. MD5暗号化パスワードが必要であることを指定します。

Byte4

The salt to use when encrypting the password. パスワード暗号化用ソルトです。

AuthenticationGSS (B) #
Byte1('R')

Identifies the message as an authentication request. 認証要求としてメッセージを識別します。

Int32(8)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(7)

Specifies that GSSAPI authentication is required. GSSAPI認証証明メッセージが必要であることを指定します。

AuthenticationGSSContinue (B) #
Byte1('R')

Identifies the message as an authentication request. 認証要求としてメッセージを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(8)

Specifies that this message contains GSSAPI or SSPI data. このデータがGSSAPIあるいはSSPIデータを含むことを指定します。

Byten

GSSAPI or SSPI authentication data. GSSAPIあるいはSSPI認証データ。

AuthenticationSSPI (B) #
Byte1('R')

Identifies the message as an authentication request. 認証要求としてメッセージを識別します。

Int32(8)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(9)

Specifies that SSPI authentication is required. SSPI認証が要求されていることを指定します。

AuthenticationSASL (B) #
Byte1('R')

Identifies the message as an authentication request. 認証要求としてメッセージを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(10)

Specifies that SASL authentication is required. SASL認証が必要であることを指定します。

The message body is a list of SASL authentication mechanisms, in the server's order of preference. A zero byte is required as terminator after the last authentication mechanism name. For each mechanism, there is the following: メッセージ本体はSASL認証機構をサーバにとって望ましい順に並べたリストです。 最後の認証機構名の後に終端子としてゼロのバイトを置く必要があります。 各機構は以下のようになります。

String

Name of a SASL authentication mechanism. SASL認証機構の名前です。

AuthenticationSASLContinue (B) #
Byte1('R')

Identifies the message as an authentication request. 認証要求としてメッセージを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(11)

Specifies that this message contains a SASL challenge. このメッセージがSASLのチャレンジを含むことを指定します。

Byten

SASL data, specific to the SASL mechanism being used. 使用するSASL機構に固有のSASLデータです。

AuthenticationSASLFinal (B) #
Byte1('R')

Identifies the message as an authentication request. 認証要求としてメッセージを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(12)

Specifies that SASL authentication has completed. SASL認証が完了したことを指定します。

Byten

SASL outcome "additional data", specific to the SASL mechanism being used. SASLの結果の「追加データ」で、使用するSASL機構に固有のものです。

BackendKeyData (B) #
Byte1('K')

Identifies the message as cancellation key data. The frontend must save these values if it wishes to be able to issue CancelRequest messages later. メッセージが取り消しのキーデータであることを識別します。 フロントエンドが後でCancelRequestメッセージを発行できるようにするためには、これらの値を保存しておかなければなりません。

Int32(12)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32

The process ID of this backend. このバックエンドのプロセスIDです。

Int32

The secret key of this backend. このバックエンドの秘密鍵です。

Bind (F) #
Byte1('B')

Identifies the message as a Bind command. メッセージがBindコマンドであることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

String

The name of the destination portal (an empty string selects the unnamed portal). 宛先ポータルの名前(空文字列にすると無名ポータルを選択します)。

String

The name of the source prepared statement (an empty string selects the unnamed prepared statement). 入力元のプリペアド文の名前(空文字列にすると無名のプリペアド文を選択します)。

Int16

The number of parameter format codes that follow (denoted <replaceable>C</replaceable> below). This can be zero to indicate that there are no parameters or that the parameters all use the default format (text); or one, in which case the specified format code is applied to all parameters; or it can equal the actual number of parameters. その後に続くパラメータ書式コードの数(以下ではCで表します)。 これは、パラメータがない、またはパラメータはすべてデフォルトの書式(テキスト)を使うことを示す0、あるいは指定の書式コードがすべてのパラメータに適用されることを示す1にすることができます。 そうでなければ、実際のパラメータの数と同じになります。

Int16[C]

The parameter format codes. Each must presently be zero (text) or one (binary). パラメータ書式コードです。 現在はそれぞれが0(テキスト)あるいは1(バイナリ)でなければなりません。

Int16

The number of parameter values that follow (possibly zero). This must match the number of parameters needed by the query. 後続するパラメータ値の数 (ゼロの場合もあります)。 これは問い合わせが必要とするパラメータ数と一致する必要があります。

Next, the following pair of fields appear for each parameter: 次に、各パラメータに対して、以下のフィールドのペアが現れます。

Int32

The length of the parameter value, in bytes (this count does not include itself). Can be zero. As a special case, -1 indicates a NULL parameter value. No value bytes follow in the NULL case. パラメータ値のバイト単位の長さ(これには自身は含まれません)。 ゼロにすることもできます。 特別な場合として、-1はNULLというパラメータ値を示します。 NULLの場合、後続の値用のバイトはありません。

Byten

The value of the parameter, in the format indicated by the associated format code. <replaceable>n</replaceable> is the above length. 関連する書式コードで示される書式におけるパラメータの値。 nは上述の長さです。

After the last parameter, the following fields appear: 最後のパラメータの後に、以下のフィールドが現れます。

Int16

The number of result-column format codes that follow (denoted <replaceable>R</replaceable> below). This can be zero to indicate that there are no result columns or that the result columns should all use the default format (text); or one, in which case the specified format code is applied to all result columns (if any); or it can equal the actual number of result columns of the query. 後続する結果列書式コードの数 (以下ではRで表します)。 これは、結果列が存在しないことを示す0、あるいはすべての結果列が(もしあれば)デフォルトの書式コード(テキスト)を使用することを示す1にすることができます。 さもなくば、問い合わせの結果列の実際の数と同じになります。

Int16[R]

The result-column format codes. Each must presently be zero (text) or one (binary). 結果列の書式コード。 現在それぞれは0(テキスト)もしくは1(バイナリ)のいずれかでなければなりません。

BindComplete (B) #
Byte1('2')

Identifies the message as a Bind-complete indicator. メッセージがBind完了指示子であることを識別します。

Int32(4)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

CancelRequest (F) #
Int32(16)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(80877102)

The cancel request code. The value is chosen to contain <literal>1234</literal> in the most significant 16 bits, and <literal>5678</literal> in the least significant 16 bits. (To avoid confusion, this code must not be the same as any protocol version number.) 取消要求コードです。 この値は、最上位16ビットに1234が、下位16ビットに5678を持つように選択されています。 (混乱を防ぐため、このコードはプロトコルバージョン番号と同一になってはいけません。)

Int32

The process ID of the target backend. 対象バックエンドのプロセスIDです。

Int32

The secret key for the target backend. 対象バックエンドの秘密鍵です。

Close (F) #
Byte1('C')

Identifies the message as a Close command. メッセージがCloseコマンドであることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Byte1

'<literal>S</literal>' to close a prepared statement; or '<literal>P</literal>' to close a portal. プリペアド文を閉ざす時は'S'。 ポータルを閉ざす時は'P'です。

String

The name of the prepared statement or portal to close (an empty string selects the unnamed prepared statement or portal). 閉ざすプリペアド文またはポータルの名前です (空文字列で無名のプリペアド文または無名ポータルを選択します)。

CloseComplete (B) #
Byte1('3')

Identifies the message as a Close-complete indicator. メッセージがClose完了指示子であることを識別します。

Int32(4)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

CommandComplete (B) #
Byte1('C')

Identifies the message as a command-completed response. メッセージがコマンド完了応答であることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

String

The command tag. This is usually a single word that identifies which SQL command was completed. コマンドタグです。 これは通常どのSQLコマンドが完了したかを表す単一の単語です。

For an <command>INSERT</command> command, the tag is <literal>INSERT <replaceable>oid</replaceable> <replaceable>rows</replaceable></literal>, where <replaceable>rows</replaceable> is the number of rows inserted. <replaceable>oid</replaceable> used to be the object ID of the inserted row if <replaceable>rows</replaceable> was 1 and the target table had OIDs, but OIDs system columns are not supported anymore; therefore <replaceable>oid</replaceable> is always 0. INSERTコマンドの場合、タグはINSERT oid rowsです。 ここでrowsは挿入された行数です。 かつてoidは、rowsが1、かつ、対象テーブルがOIDを持つ場合、挿入された行のオブジェクトIDでしたが、もはやOID列はサポートされていません。 ですからoidは常に0です。

For a <command>DELETE</command> command, the tag is <literal>DELETE <replaceable>rows</replaceable></literal> where <replaceable>rows</replaceable> is the number of rows deleted. DELETEコマンドの場合、タグはDELETE rowsです。 ここでrowsは削除された行数です。

For an <command>UPDATE</command> command, the tag is <literal>UPDATE <replaceable>rows</replaceable></literal> where <replaceable>rows</replaceable> is the number of rows updated. UPDATEコマンドの場合、タグはUPDATE rowsです。 ここでrowsは更新された行数です。

For a <command>MERGE</command> command, the tag is <literal>MERGE <replaceable>rows</replaceable></literal> where <replaceable>rows</replaceable> is the number of rows inserted, updated, or deleted. MERGEコマンドの場合、タグはMERGE rowsです。 ここでrowsは挿入、更新、削除された行数です。

For a <command>SELECT</command> or <command>CREATE TABLE AS</command> command, the tag is <literal>SELECT <replaceable>rows</replaceable></literal> where <replaceable>rows</replaceable> is the number of rows retrieved. SELECTまたはCREATE TABLE ASの場合、タグはSELECT rowsとなります。 ここでrowsは取り込んだ行数です。

For a <command>MOVE</command> command, the tag is <literal>MOVE <replaceable>rows</replaceable></literal> where <replaceable>rows</replaceable> is the number of rows the cursor's position has been changed by. MOVEコマンドの場合、タグはMOVE rowsです。 ここでrowsは、カーソル位置が何行変更されたかを示す数です。

For a <command>FETCH</command> command, the tag is <literal>FETCH <replaceable>rows</replaceable></literal> where <replaceable>rows</replaceable> is the number of rows that have been retrieved from the cursor. FETCHコマンドの場合、タグはFETCH rowsです。 ここでrowsは、カーソルから何行取り出したかを示す行数です。

For a <command>COPY</command> command, the tag is <literal>COPY <replaceable>rows</replaceable></literal> where <replaceable>rows</replaceable> is the number of rows copied. (Note: the row count appears only in <productname>PostgreSQL</productname> 8.2 and later.) COPYコマンドの場合、タグはCOPY rowsです。 ここでrowsは、コピーされた行数です(注意:この行数はPostgreSQL 8.2以降でのみ出力されます)。

CopyData (F & B) #
Byte1('d')

Identifies the message as <command>COPY</command> data. メッセージがデータのCOPYであることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Byten

Data that forms part of a <command>COPY</command> data stream. Messages sent from the backend will always correspond to single data rows, but messages sent by frontends might divide the data stream arbitrarily. COPYデータストリームの一部を形成するデータです。 バックエンドから送信されるメッセージは、常に1つのデータ行に対応します。 しかし、フロントエンドから送信されるメッセージは任意のデータストリームに分割される可能性があります。

CopyDone (F & B) #
Byte1('c')

Identifies the message as a <command>COPY</command>-complete indicator. メッセージがCOPY完了指示子であることを識別します。

Int32(4)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

CopyFail (F) #
Byte1('f')

Identifies the message as a <command>COPY</command>-failure indicator. メッセージがCOPY失敗指示子であることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

String

An error message to report as the cause of failure. 失敗の原因を報告するエラーメッセージです。

CopyInResponse (B) #
Byte1('G')

Identifies the message as a Start Copy In response. The frontend must now send copy-in data (if not prepared to do so, send a CopyFail message). メッセージがStart Copy Inの応答であることを識別します。 フロントエンドはここで必ずコピーインデータを送信しなければなりません (まだ準備ができていない場合はCopyFailメッセージを送信してください)。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int8

0 indicates the overall <command>COPY</command> format is textual (rows separated by newlines, columns separated by separator characters, etc.). 1 indicates the overall copy format is binary (similar to DataRow format). See <xref linkend="sql-copy"/> for more information. 0はCOPY全体の書式がテキスト(行は改行で区切られ、列は区切り文字などで区切られます)であることを示します。 1はコピー全体の書式がバイナリ(DataRowの書式同様)であることを示します。 詳細についてはCOPYを参照してください。

Int16

The number of columns in the data to be copied (denoted <replaceable>N</replaceable> below). コピーされるデータ内の列数です (以下ではNと表されます)。

Int16[N]

The format codes to be used for each column. Each must presently be zero (text) or one (binary). All must be zero if the overall copy format is textual. 各列で使用される書式コードです。 現在それぞれは0(テキスト)または1(バイナリ)でなければなりません。 コピー全体の書式がテキストの場合、すべてが0でなければなりません。

CopyOutResponse (B) #
Byte1('H')

Identifies the message as a Start Copy Out response. This message will be followed by copy-out data. メッセージがStart Copy Outの応答であることを識別します。 このメッセージの後にコピーアウトデータが続きます。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int8

0 indicates the overall <command>COPY</command> format is textual (rows separated by newlines, columns separated by separator characters, etc.). 1 indicates the overall copy format is binary (similar to DataRow format). See <xref linkend="sql-copy"/> for more information. 0はCOPY全体の書式がテキスト(行は改行で区切られ、列は区切り文字などで区切られます)であることを示します。 1はコピー全体の書式がバイナリ(DataRowの書式同様)であることを示します。 詳細についてはCOPYを参照してください。

Int16

The number of columns in the data to be copied (denoted <replaceable>N</replaceable> below). コピーされるデータ内の列数です (以下ではNと表されます)。

Int16[N]

The format codes to be used for each column. Each must presently be zero (text) or one (binary). All must be zero if the overall copy format is textual. 各列で使用される書式コードです。 現在それぞれは0(テキスト)または1(バイナリ)でなければなりません。 コピー全体の書式がテキストの場合、すべてが0でなければなりません。

CopyBothResponse (B) #
Byte1('W')

Identifies the message as a Start Copy Both response. This message is used only for Streaming Replication. メッセージがStart Copy Bothの応答であることを識別します。 このメッセージはストリーミングレプリケーションのみで使用されます。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int8

0 indicates the overall <command>COPY</command> format is textual (rows separated by newlines, columns separated by separator characters, etc.). 1 indicates the overall copy format is binary (similar to DataRow format). See <xref linkend="sql-copy"/> for more information. 0はCOPY全体の書式がテキスト(行は改行で区切られ、列は区切り文字などで区切られます)であることを示します。 1はコピー全体の書式がバイナリ(DataRowの書式同様)であることを示します。 詳細についてはCOPYを参照してください。

Int16

The number of columns in the data to be copied (denoted <replaceable>N</replaceable> below). コピーされるデータ内の列数です (以下ではNと表されます)。

Int16[N]

The format codes to be used for each column. Each must presently be zero (text) or one (binary). All must be zero if the overall copy format is textual. 各列で使用される書式コードです。 現在それぞれは0(テキスト)または1(バイナリ)でなければなりません。 コピー全体の書式がテキストの場合、すべてが0でなければなりません。

DataRow (B) #
Byte1('D')

Identifies the message as a data row. メッセージがデータ行であることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int16

The number of column values that follow (possibly zero). 後に続く列値の数です (ゼロの場合もあります)。

Next, the following pair of fields appear for each column: 次に、各列について以下のフィールドのペアが現れます。

Int32

The length of the column value, in bytes (this count does not include itself). Can be zero. As a special case, -1 indicates a NULL column value. No value bytes follow in the NULL case. 列値のバイト単位の長さです (これには自身は含まれません)。 ゼロとすることもできます。 特別な場合として、-1はNULLという列値を示します。 NULLの場合、後続の値用のバイトはありません。

Byten

The value of the column, in the format indicated by the associated format code. <replaceable>n</replaceable> is the above length. 関連する書式コードで示される書式における列の値。 nは上述の長さです。

Describe (F) #
Byte1('D')

Identifies the message as a Describe command. メッセージがDescribeコマンドであることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Byte1

'<literal>S</literal>' to describe a prepared statement; or '<literal>P</literal>' to describe a portal. プリペアド文の記述の場合は'S'。 ポータルの記述の場合は'P'です。

String

The name of the prepared statement or portal to describe (an empty string selects the unnamed prepared statement or portal). 記述を求めるプリペアド文またはポータルの名前です (空文字列で無名のプリペアド文または無名ポータルを選択します)。

EmptyQueryResponse (B) #
Byte1('I')

Identifies the message as a response to an empty query string. (This substitutes for CommandComplete.) メッセージが空の問い合わせ文字列に対する応答であることを識別します (これはCommandCompleteを置き換えます)。

Int32(4)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

ErrorResponse (B) #
Byte1('E')

Identifies the message as an error. メッセージがエラーであることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

The message body consists of one or more identified fields, followed by a zero byte as a terminator. Fields can appear in any order. For each field there is the following: このメッセージの本体には、ゼロバイトを終端として後続する、1つ以上の識別されるフィールドが含まれます。 フィールドは任意の順番で現れる可能性があります。 各フィールドには以下があります。

Byte1

A code identifying the field type; if zero, this is the message terminator and no string follows. The presently defined field types are listed in <xref linkend="protocol-error-fields"/>. Since more field types might be added in future, frontends should silently ignore fields of unrecognized type. フィールド種類を識別するコードです。 ゼロならば、メッセージの終端であり、後続する文字列がないことを表します。 55.8に、現時点でフィールド種類として定義されているものを列挙します。 将来もっと多くのフィールド種類が追加される可能性がありますので、フロントエンドは、認知できない種類のフィールドに対して何もせずに無視すべきです。

String

The field value. フィールド値です。

Execute (F) #
Byte1('E')

Identifies the message as an Execute command. メッセージがExecuteコマンドであることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

String

The name of the portal to execute (an empty string selects the unnamed portal). 実行するポータルの名前です。 (空文字列で無名ポータルを選択します)。

Int32

Maximum number of rows to return, if portal contains a query that returns rows (ignored otherwise). Zero denotes <quote>no limit</quote>. ポータルが行を返す問い合わせの場合、返される行数の最大値です (他の問い合わせでは無視されます)。 ゼロは無制限を表します。

Flush (F) #
Byte1('H')

Identifies the message as a Flush command. メッセージがFlushコマンドであることを識別します。

Int32(4)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

FunctionCall (F) #
Byte1('F')

Identifies the message as a function call. メッセージが関数呼び出しであることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32

Specifies the object ID of the function to call. 呼び出す関数のオブジェクトIDを指定します。

Int16

The number of argument format codes that follow (denoted <replaceable>C</replaceable> below). This can be zero to indicate that there are no arguments or that the arguments all use the default format (text); or one, in which case the specified format code is applied to all arguments; or it can equal the actual number of arguments. 後述する引数書式コード数です (以下ではCと表します)。 これは、引数が存在しない、あるいは、すべての引数がデフォルトの書式(テキスト)を使用することを示す0に、指定する書式コードをすべての引数に適用することを示す1にすることができます。 さもなくば、これは実際の引数の数と同じになります。

Int16[C]

The argument format codes. Each must presently be zero (text) or one (binary). 引数の書式コードです。 それぞれは、0(テキスト)もしくは1(バイナリ)でなければなりません。

Int16

Specifies the number of arguments being supplied to the function. 関数に提供する引数の数を指定します。

Next, the following pair of fields appear for each argument: 次に、各引数に対して以下のフィールドのペアが現れます。

Int32

The length of the argument value, in bytes (this count does not include itself). Can be zero. As a special case, -1 indicates a NULL argument value. No value bytes follow in the NULL case. 引数の値のバイト単位の長さです (これには自身は含まれません)。 0とすることもできます。 特別な場合として、-1はNULLという引数の値を示します。 NULLの場合、後続の値用のバイトはありません。

Byten

The value of the argument, in the format indicated by the associated format code. <replaceable>n</replaceable> is the above length. 関連する書式コードで示される書式における引数の値。 nは上述の長さです。

After the last argument, the following field appears: 最後の引数の後に、以下のフィールドが現れます。

Int16

The format code for the function result. Must presently be zero (text) or one (binary). 関数結果用の書式コードです。 現在、0(テキスト)または1(バイナリ)でなければなりません。

FunctionCallResponse (B) #
Byte1('V')

Identifies the message as a function call result. メッセージが関数呼び出しの結果であることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32

The length of the function result value, in bytes (this count does not include itself). Can be zero. As a special case, -1 indicates a NULL function result. No value bytes follow in the NULL case. 関数の結果の値のバイト単位の長さです (これには自身は含まれません)。 ゼロとすることもできます。 特別な場合として、-1はNULLという関数の結果の値を示します。 NULLの場合、後続の値用のバイトはありません。

Byten

The value of the function result, in the format indicated by the associated format code. <replaceable>n</replaceable> is the above length. 関連する書式コードで示される書式における関数の結果の値。 nは上述の長さです。

GSSENCRequest (F) #
Int32(8)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(80877104)

The <acronym>GSSAPI</acronym> Encryption request code. The value is chosen to contain <literal>1234</literal> in the most significant 16 bits, and <literal>5680</literal> in the least significant 16 bits. (To avoid confusion, this code must not be the same as any protocol version number.) GSSAPI暗号化要求コードです。 この値は、最上位16ビットに1234が、下位16ビットに5680を持つように選択されています。 (混乱を防ぐため、このコードはプロトコルバージョン番号と同一になってはいけません。)

GSSResponse (F) #
Byte1('p')

Identifies the message as a GSSAPI or SSPI response. Note that this is also used for SASL and password response messages. The exact message type can be deduced from the context. このメッセージがGSSAPIまたはSSPI応答であることを識別します。 これはSASLおよびパスワードの応答メッセージにも使用されることに注意してください。 厳密なメッセージ種別は、その状況から推論できます。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Byten

GSSAPI/SSPI specific message data. GSSAPI/SSPIに固有のメッセージデータ。

NegotiateProtocolVersion (B) #
Byte1('v')

Identifies the message as a protocol version negotiation message. メッセージが、プロトコルバージョン交渉メッセージであることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32

Newest minor protocol version supported by the server for the major protocol version requested by the client. クライアントが要求したメジャープロトコルバージョンに対し、サーバがサポートする最新のマイナープロトコルバージョン。

Int32

Number of protocol options not recognized by the server. サーバが認識しなかったプロトコルオプションの数。

Then, for protocol option not recognized by the server, there is the following: 続いて、サーバが認識しなかったプロトコルオプションに対して以下が続きます。

String

The option name. オプション名。

NoData (B) #
Byte1('n')

Identifies the message as a no-data indicator. メッセージがデータなしの指示子であることを識別します。

Int32(4)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

NoticeResponse (B) #
Byte1('N')

Identifies the message as a notice. メッセージが警報であることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

The message body consists of one or more identified fields, followed by a zero byte as a terminator. Fields can appear in any order. For each field there is the following: このメッセージの本体には、ゼロバイトを終端として後続する、1つ以上の識別されるフィールドが含まれます。 フィールドは任意の順番で現れる可能性があります。 各フィールドには以下があります。

Byte1

A code identifying the field type; if zero, this is the message terminator and no string follows. The presently defined field types are listed in <xref linkend="protocol-error-fields"/>. Since more field types might be added in future, frontends should silently ignore fields of unrecognized type. フィールド種類を識別するコードです。 ゼロならば、メッセージの終端であり、後続する文字列がないことを表します。 55.8に、現時点でフィールド種類として定義されているものを列挙します。 将来もっと多くのフィールド種類が追加される可能性がありますので、フロントエンドは、認知できない種類のフィールドに対して何もせずに無視すべきです。

String

The field value. フィールド値です。

NotificationResponse (B) #
Byte1('A')

Identifies the message as a notification response. メッセージが通知応答であることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32

The process ID of the notifying backend process. 通知元バックエンドのプロセスIDです。

String

The name of the channel that the notify has been raised on. 通知の発生元となったチャネル名です。

String

The <quote>payload</quote> string passed from the notifying process. 通知プロセスから渡されるペイロード文字列です。

ParameterDescription (B) #
Byte1('t')

Identifies the message as a parameter description. メッセージがパラメータ記述であることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int16

The number of parameters used by the statement (can be zero). 文で使用されるパラメータ数です (ゼロとすることができます)。

Then, for each parameter, there is the following: そして、各パラメータに対して、以下が続きます。

Int32

Specifies the object ID of the parameter data type. パラメータのデータ型のオブジェクトIDを指定します。

ParameterStatus (B) #
Byte1('S')

Identifies the message as a run-time parameter status report. メッセージが実行時パラメータ状態報告であることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

String

The name of the run-time parameter being reported. 報告される実行時パラメータの名前です。

String

The current value of the parameter. そのパラメータの現在値です。

Parse (F) #
Byte1('P')

Identifies the message as a Parse command. メッセージがParseコマンドであることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

String

The name of the destination prepared statement (an empty string selects the unnamed prepared statement). 宛先のプリペアド文の名前です (空文字列で無名のプリペアド文を選択します)。

String

The query string to be parsed. 解析される問い合わせ文字列です。

Int16

The number of parameter data types specified (can be zero). Note that this is not an indication of the number of parameters that might appear in the query string, only the number that the frontend wants to prespecify types for. 指定されるパラメータデータ型の数です (ゼロとすることができます)。 これは、問い合わせ文字列内にあるパラメータの数を示すものではないことに注意してください。 フロントエンドが型指定を希望するパラメータの数でしかありません。

Then, for each parameter, there is the following: そして、各パラメータに対して、以下が続きます。

Int32

Specifies the object ID of the parameter data type. Placing a zero here is equivalent to leaving the type unspecified. パラメータのデータ型のオブジェクトIDを指定します。 ここにゼロを書くことは型指定を行わないことと同じです。

ParseComplete (B) #
Byte1('1')

Identifies the message as a Parse-complete indicator. メッセージがParse完了指示子であることを識別します。

Int32(4)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

PasswordMessage (F) #
Byte1('p')

Identifies the message as a password response. Note that this is also used for GSSAPI, SSPI and SASL response messages. The exact message type can be deduced from the context. メッセージがパスワード応答であることを識別します。 これがGSSAPI、SSPIまたはSASL応答メッセージでも使用されることに注意してください。 厳密なメッセージ種別は、その状況から推論できます。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

String

The password (encrypted, if requested). パスワードです (必要ならば暗号化されています)。

PortalSuspended (B) #
Byte1('s')

Identifies the message as a portal-suspended indicator. Note this only appears if an Execute message's row-count limit was reached. メッセージがポータル中断指示子であることを識別します。 これは、Executeメッセージの行数制限に達した場合にのみ現れることに注意してください。

Int32(4)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Query (F) #
Byte1('Q')

Identifies the message as a simple query. メッセージが簡易問い合わせであることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

String

The query string itself. 問い合わせ文字列自体です。

ReadyForQuery (B) #
Byte1('Z')

Identifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle. このメッセージ種類を識別します。 バックエンドで新しい問い合わせサイクルの準備が整った時には常にReadyForQueryが送信されます。

Int32(5)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Byte1

Current backend transaction status indicator. Possible values are '<literal>I</literal>' if idle (not in a transaction block); '<literal>T</literal>' if in a transaction block; or '<literal>E</literal>' if in a failed transaction block (queries will be rejected until block is ended). 現在のバックエンドのトランザクション状態指示子です。 取り得る値は、待機状態(トランザクションブロックにない状態)に'I'、トランザクションブロック内の場合に'T'、失敗したトランザクションブロック(ブロックが終わるまで問い合わせは拒絶されます)内の場合に'E'です。

RowDescription (B) #
Byte1('T')

Identifies the message as a row description. メッセージが行の記述であることを識別します。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int16

Specifies the number of fields in a row (can be zero). 行内のフィールド数を指定します (ゼロとすることができます)。

Then, for each field, there is the following: その後、各フィールドに対して以下が続きます。

String

The field name. フィールド名です。

Int32

If the field can be identified as a column of a specific table, the object ID of the table; otherwise zero. フィールドが特定のテーブルの列として識別できる場合、テーブルのオブジェクトIDです。 さもなくばゼロです。

Int16

If the field can be identified as a column of a specific table, the attribute number of the column; otherwise zero. フィールドが特定のテーブルの列として識別できる場合、列の属性番号です。 さもなくばゼロです。

Int32

The object ID of the field's data type. フィールドのデータ型のオブジェクトIDです。

Int16

The data type size (see <varname>pg_type.typlen</varname>). Note that negative values denote variable-width types. データ型の大きさ(pg_type.typlenを参照)です。 負の値が可変長の型を表すことに注意してください。

Int32

The type modifier (see <varname>pg_attribute.atttypmod</varname>). The meaning of the modifier is type-specific. 型修飾子(pg_attribute.atttypmodを参照)です。 修飾子の意味は型に固有です。

Int16

The format code being used for the field. Currently will be zero (text) or one (binary). In a RowDescription returned from the statement variant of Describe, the format code is not yet known and will always be zero. フィールドに使用される書式コードです。 現在、0(テキスト)または1(バイナリ)のいずれかになります。 RowDescriptionがステートメント用のDescribeから返された場合、書式コードはまだ不明ですので、常に0になります。

SASLInitialResponse (F) #
Byte1('p')

Identifies the message as an initial SASL response. Note that this is also used for GSSAPI, SSPI and password response messages. The exact message type is deduced from the context. メッセージが最初のSASL応答であることを識別します。 これがGSSAPI、SSPIまたはパスワード応答メッセージでも使用されることに注意してください。 厳密なメッセージ種別は、その状況から推論できます。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

String

Name of the SASL authentication mechanism that the client selected. クライアントが選択したSASL認証機構の名前。

Int32

Length of SASL mechanism specific "Initial Client Response" that follows, or -1 if there is no Initial Response. それに続くSASLの機構固有の「Initial Client Response(最初のクライアントの応答)」の長さ、またはInitial Responseがなければ-1。

Byten

SASL mechanism specific "Initial Response". SASLの機構固有の「Initial Response(最初の応答)」。

SASLResponse (F) #
Byte1('p')

Identifies the message as a SASL response. Note that this is also used for GSSAPI, SSPI and password response messages. The exact message type can be deduced from the context. メッセージがSASL応答であることを識別します。 これがGSSAPI、SSPIまたはパスワード応答メッセージでも使用されることに注意してください。 厳密なメッセージ種別は、その状況から推論できます。

Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Byten

SASL mechanism specific message data. SASLの機構固有のメッセージデータ

SSLRequest (F) #
Int32(8)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(80877103)

The <acronym>SSL</acronym> request code. The value is chosen to contain <literal>1234</literal> in the most significant 16 bits, and <literal>5679</literal> in the least significant 16 bits. (To avoid confusion, this code must not be the same as any protocol version number.) SSL要求コードです。 この値は最上位の16ビットに1234が、最下位の16ビットに5679が含まれるように選択されます。 (混乱を防ぐため、このコードはどのプロトコルのバージョン番号とも同じになってはいけません。)

StartupMessage (F) #
Int32

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Int32(196608)

The protocol version number. The most significant 16 bits are the major version number (3 for the protocol described here). The least significant 16 bits are the minor version number (0 for the protocol described here). プロトコルのバージョン番号です。 最上位の16ビットはメジャーバージョン番号(ここで説明しているプロトコルでは3)です。 最下位の16ビットはマイナーバージョン番号(ここで説明しているプロトコルでは0)です。

The protocol version number is followed by one or more pairs of parameter name and value strings. A zero byte is required as a terminator after the last name/value pair. Parameters can appear in any order. <literal>user</literal> is required, others are optional. Each parameter is specified as: プロトコルのバージョン番号の後には、パラメータ名と値文字列の対が1つ以上続きます。 最後の名前/値の対の後に終端子としてゼロのバイトが必要です。 パラメータは任意の順番に並べることができます。 userが必須、他はオプションです。 各パラメータは以下のように指定します。

String

The parameter name. Currently recognized names are: パラメータ名。現在認識されている名前は:

user

The database user name to connect as. Required; there is no default. 接続するデータベースユーザ名。必須。 デフォルトはありません。

database

The database to connect to. Defaults to the user name. 接続するデータベースです。 デフォルトはユーザ名です。

options

Command-line arguments for the backend. (This is deprecated in favor of setting individual run-time parameters.) Spaces within this string are considered to separate arguments, unless escaped with a backslash (<literal>\</literal>); write <literal>\\</literal> to represent a literal backslash. バックエンド用のコマンドライン引数です。 (これは廃棄予定であり、個々の実行時パラメータを設定する方が好ましいです。) この文字列の中の空白は、バックスラッシュ(\)でエスケープされていなければ、引数を分けるためのものとみなされます。 バックスラッシュそのものを表すためには\\と書いてください。

replication

Used to connect in streaming replication mode, where a small set of replication commands can be issued instead of SQL statements. Value can be <literal>true</literal>, <literal>false</literal>, or <literal>database</literal>, and the default is <literal>false</literal>. See <xref linkend="protocol-replication"/> for details. ストリーミングレプリケーションモードで接続するのに使用され、SQL文の代わりにレプリケーションコマンドの小さな集合を発行することができます。 値はtruefalseまたはdatabaseをとることができ、デフォルトはfalseです。 詳細は55.4を参照してください。

In addition to the above, other parameters may be listed. Parameter names beginning with <literal>_pq_.</literal> are reserved for use as protocol extensions, while others are treated as run-time parameters to be set at backend start time. Such settings will be applied during backend start (after parsing the command-line arguments if any) and will act as session defaults. 上記に加え、他のパラメータが列挙される可能性があります _pq_.で始まるパラメータ名は、プロトコルの拡張用途のために予約されています。 それ以外は、バックエンド開始時に設定される実行時パラメータとして扱われます。 こうした設定は、バックエンド起動時に(もしあればコマンドライン引数の解析の後に)適用されます。 この値はセッションのデフォルトとして動作します。

String

The parameter value. パラメータの値です。

Sync (F) #
Byte1('S')

Identifies the message as a Sync command. メッセージがSyncコマンドであることを識別します。

Int32(4)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。

Terminate (F) #
Byte1('X')

Identifies the message as a termination. メッセージが終了であることを識別します。

Int32(4)

Length of message contents in bytes, including self. 自身を含むメッセージ内容のバイト単位の長さ。