PostgreSQL | ||
---|---|---|
Prev | Chapter 50. Frontend/Backend Protocol | Next |
This section describes the detailed format of each message. Each can be sent by either a frontend (F), a postmaster/backend (B), or both (F & B).
Identifies the message, in the context in which it is sent (see CopyInResponse), as an ASCII row.
A bit map with one bit for each field in the row. The 1st field corresponds to bit 7 of the 1st byte, the 2nd field corresponds to bit 6 of the 1st byte, the 8th field corresponds to bit 0 of the 1st byte, the 9th field corresponds to bit 8 of the 2nd byte, and so on. The bit is set if the value of the corresponding field is not NULL.
Then, for each field, there is the following:
Specifies the size of the value of the field, including this size.
Specifies the value of the field itself in ASCII characters. n is the above size minus 4.
Identifies the message as an authentication request.
Specifies that the authentication was successful.
Identifies the message as an authentication request.
Specifies that Kerberos V4 authentication is required.
Identifies the message as an authentication request.
Specifies that Kerberos V5 authentication is required.
Identifies the message as an authentication request.
Specifies that an unencrypted password is required.
Identifies the message as an authentication request.
Specifies that an encrypted password is required.
The salt to use when encrypting the password.
Identifies the message, in the context in which it is sent (see CopyOutResponse), as a binary row.
A bit map with one bit for each field in the row. The 1st field corresponds to bit 7 of the 1st byte, the 2nd field corresponds to bit 6 of the 1st byte, the 8th field corresponds to bit 0 of the 1st byte, the 9th field corresponds to bit 8 of the 2nd byte, and so on. The bit is set if the value of the corresponding field is not NULL.
Then, for each field, there is the following:
Specifies the size of the value of the field, excluding this size.
Specifies the value of the field itself in binary format. n is the above size.
Identifies the message as a completed response.
The command tag. This is usually (but not always) a single word that identifies which SQL command was completed.
This is a stream of rows where each row is terminated by a Char1('\n'). This is then followed by the sequence Char1('\\'), Char1('.'), Char1('\n').
Identifies the message, in the context in which it is sent (see AsciiRow), as a copy in started response.
Identifies the message, in the context in which it is sent (see BinaryRow), as a copy out started response.
Identifies the message as a cursor response.
The name of the cursor. This will be "blank" if the cursor is implicit.
Identifies the message as an empty query response.
Unused.
The size of the packet in bytes.
The encrypted (using crypt()) password.
Identifies the message as an error.
The error message itself.
Identifies the message as a function call.
Unused.
Specifies the object ID of the function to call.
Specifies the number of arguments being supplied to the function.
Then, for each argument, there is the following:
Specifies the size of the value of the argument, excluding this size.
Specifies the value of the field itself in binary format. n is the above size.
Identifies the message as a function call result.
Specifies that an actual result was returned.
Specifies the size of the value of the result, excluding this size.
Specifies the value of the result itself in binary format. n is the above size.
Unused. (Strictly speaking, FunctionResultResponse and FunctionVoidResponse are the same thing but with some optional parts to the message.)
Identifies the message as a function call result.
Specifies that no actual result was returned.
Identifies the message as a notice.
The notice message itself.
Identifies the message as a notification response.
The process ID of the backend process.
The name of the relation that the notify has been raised on.
Identifies the message as query.
The query itself.
Identifies the message as a row description.
Specifies the number of fields in a row (and may be zero).
Then, for each field, there is the following:
Specifies the field name.
Specifies the object ID of the field type.
Specifies the type size.
The size of the packet in bytes.
The protocol version number. The most significant 16 bits are the major version number. The least 16 significant bits are the minor version number.
The database name, defaults to the user name if omitted.
The user name.
Any additional command line arguments to be passed to the backend by the postmaster.
Unused.
The optional tty the backend should use for debugging messages.
Identifies the message as a termination.
The size of the packet in bytes.
The unencrypted password.
Prev | Home | Next |
Message Data Types | Up | GCC Default Optimizations |