Skip to content

Instantly share code, notes, and snippets.

@GavinRay97
Last active December 23, 2022 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GavinRay97/08e2bfc9f51176c099a7c90a4531069c to your computer and use it in GitHub Desktop.
Save GavinRay97/08e2bfc9f51176c099a7c90a4531069c to your computer and use it in GitHub Desktop.
Postgres wire-protocol types as a JSON document, for whatever you like
{
"AuthenticationOk": {
"type": "backend",
"fields": [
{
"name": "Byte1('R')",
"type": "Byte1",
"description": "Identifies the message as an authentication request.",
"value": "'R'"
},
{
"name": "Int32(8)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "8"
},
{
"name": "Int32(0)",
"type": "Int32",
"description": "Specifies that the authentication was successful.",
"value": "0"
}
]
},
"AuthenticationKerberosV5": {
"type": "backend",
"fields": [
{
"name": "Byte1('R')",
"type": "Byte1",
"description": "Identifies the message as an authentication request.",
"value": "'R'"
},
{
"name": "Int32(8)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "8"
},
{
"name": "Int32(2)",
"type": "Int32",
"description": "Specifies that Kerberos V5 authentication is required.",
"value": "2"
}
]
},
"AuthenticationCleartextPassword": {
"type": "backend",
"fields": [
{
"name": "Byte1('R')",
"type": "Byte1",
"description": "Identifies the message as an authentication request.",
"value": "'R'"
},
{
"name": "Int32(8)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "8"
},
{
"name": "Int32(3)",
"type": "Int32",
"description": "Specifies that a clear-text password is required.",
"value": "3"
}
]
},
"AuthenticationMD5Password": {
"type": "backend",
"fields": [
{
"name": "Byte1('R')",
"type": "Byte1",
"description": "Identifies the message as an authentication request.",
"value": "'R'"
},
{
"name": "Int32(12)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "12"
},
{
"name": "Int32(5)",
"type": "Int32",
"description": "Specifies that an MD5-encrypted password is required.",
"value": "5"
},
{
"name": "Byte4",
"type": "Byte4",
"description": "The salt to use when encrypting the password."
}
]
},
"AuthenticationSCMCredential": {
"type": "backend",
"fields": [
{
"name": "Byte1('R')",
"type": "Byte1",
"description": "Identifies the message as an authentication request.",
"value": "'R'"
},
{
"name": "Int32(8)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "8"
},
{
"name": "Int32(6)",
"type": "Int32",
"description": "Specifies that an SCM credentials message is required.",
"value": "6"
}
]
},
"AuthenticationGSS": {
"type": "backend",
"fields": [
{
"name": "Byte1('R')",
"type": "Byte1",
"description": "Identifies the message as an authentication request.",
"value": "'R'"
},
{
"name": "Int32(8)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "8"
},
{
"name": "Int32(7)",
"type": "Int32",
"description": "Specifies that GSSAPI authentication is required.",
"value": "7"
}
]
},
"AuthenticationGSSContinue": {
"type": "backend",
"fields": [
{
"name": "Byte1('R')",
"type": "Byte1",
"description": "Identifies the message as an authentication request.",
"value": "'R'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int32(8)",
"type": "Int32",
"description": "Specifies that this message contains GSSAPI or SSPI data.",
"value": "8"
},
{
"name": "Byten",
"type": "Byten",
"description": "GSSAPI or SSPI authentication data."
}
]
},
"AuthenticationSSPI": {
"type": "backend",
"fields": [
{
"name": "Byte1('R')",
"type": "Byte1",
"description": "Identifies the message as an authentication request.",
"value": "'R'"
},
{
"name": "Int32(8)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "8"
},
{
"name": "Int32(9)",
"type": "Int32",
"description": "Specifies that SSPI authentication is required.",
"value": "9"
}
]
},
"AuthenticationSASL": {
"type": "backend",
"fields": [
{
"name": "Byte1('R')",
"type": "Byte1",
"description": "Identifies the message as an authentication request.",
"value": "'R'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int32(10)",
"type": "Int32",
"description": "Specifies that SASL authentication is required.",
"value": "10"
},
{
"name": "String",
"type": "String",
"description": "Name of a SASL authentication mechanism."
}
]
},
"AuthenticationSASLContinue": {
"type": "backend",
"fields": [
{
"name": "Byte1('R')",
"type": "Byte1",
"description": "Identifies the message as an authentication request.",
"value": "'R'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int32(11)",
"type": "Int32",
"description": "Specifies that this message contains a SASL challenge.",
"value": "11"
},
{
"name": "Byten",
"type": "Byten",
"description": "SASL data, specific to the SASL mechanism being used."
}
]
},
"AuthenticationSASLFinal": {
"type": "backend",
"fields": [
{
"name": "Byte1('R')",
"type": "Byte1",
"description": "Identifies the message as an authentication request.",
"value": "'R'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int32(12)",
"type": "Int32",
"description": "Specifies that SASL authentication has completed.",
"value": "12"
},
{
"name": "Byten",
"type": "Byten",
"description": "SASL outcome \"additional data\", specific to the SASL mechanism being used."
}
]
},
"BackendKeyData": {
"type": "backend",
"fields": [
{
"name": "Byte1('K')",
"type": "Byte1",
"description": "Identifies the message as cancellation key data. The frontend must save these values if it wishes to be able to issue CancelRequest messages later.",
"value": "'K'"
},
{
"name": "Int32(12)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "12"
},
{
"name": "Int32",
"type": "Int32",
"description": "The process ID of this backend."
},
{
"name": "Int32",
"type": "Int32",
"description": "The secret key of this backend."
}
]
},
"Bind": {
"type": "frontend",
"fields": [
{
"name": "Byte1('B')",
"type": "Byte1",
"description": "Identifies the message as a Bind command.",
"value": "'B'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "String",
"type": "String",
"description": "The name of the destination portal (an empty string selects the unnamed portal)."
},
{
"name": "String",
"type": "String",
"description": "The name of the source prepared statement (an empty string selects the unnamed prepared statement)."
},
{
"name": "Int16",
"type": "Int16",
"description": "The number of parameter format codes that follow (denoted C 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."
},
{
"name": "Int16[C]",
"type": "Int16",
"description": "The parameter format codes. Each must presently be zero (text) or one (binary).",
"arraySize": "C"
},
{
"name": "Int16",
"type": "Int16",
"description": "The number of parameter values that follow (possibly zero). This must match the number of parameters needed by the query."
},
{
"name": "Int32",
"type": "Int32",
"description": "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."
},
{
"name": "Byten",
"type": "Byten",
"description": "The value of the parameter, in the format indicated by the associated format code. n is the above length."
},
{
"name": "Int16",
"type": "Int16",
"description": "The number of result-column format codes that follow (denoted R 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."
},
{
"name": "Int16[R]",
"type": "Int16",
"description": "The result-column format codes. Each must presently be zero (text) or one (binary).",
"arraySize": "R"
}
]
},
"BindComplete": {
"type": "backend",
"fields": [
{
"name": "Byte1('2')",
"type": "Byte1",
"description": "Identifies the message as a Bind-complete indicator.",
"value": "'2'"
},
{
"name": "Int32(4)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "4"
}
]
},
"CancelRequest": {
"type": "frontend",
"fields": [
{
"name": "Int32(16)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "16"
},
{
"name": "Int32(80877102)",
"type": "Int32",
"description": "The cancel request code. The value is chosen to contain 1234 in the most significant 16 bits, and 5678 in the least significant 16 bits. (To avoid confusion, this code must not be the same as any protocol version number.)",
"value": "80877102"
},
{
"name": "Int32",
"type": "Int32",
"description": "The process ID of the target backend."
},
{
"name": "Int32",
"type": "Int32",
"description": "The secret key for the target backend."
}
]
},
"Close": {
"type": "frontend",
"fields": [
{
"name": "Byte1('C')",
"type": "Byte1",
"description": "Identifies the message as a Close command.",
"value": "'C'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Byte1",
"type": "Byte1",
"description": "'S' to close a prepared statement; or 'P' to close a portal."
},
{
"name": "String",
"type": "String",
"description": "The name of the prepared statement or portal to close (an empty string selects the unnamed prepared statement or portal)."
}
]
},
"CloseComplete": {
"type": "backend",
"fields": [
{
"name": "Byte1('3')",
"type": "Byte1",
"description": "Identifies the message as a Close-complete indicator.",
"value": "'3'"
},
{
"name": "Int32(4)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "4"
}
]
},
"CommandComplete": {
"type": "backend",
"fields": [
{
"name": "Byte1('C')",
"type": "Byte1",
"description": "Identifies the message as a command-completed response.",
"value": "'C'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "String",
"type": "String",
"description": "The command tag. This is usually a single word that identifies which SQL command was completed."
}
]
},
"CopyData (F & B)": {
"type": "both",
"fields": [
{
"name": "Byte1('d')",
"type": "Byte1",
"description": "Identifies the message as COPY data.",
"value": "'d'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Byten",
"type": "Byten",
"description": "Data that forms part of a COPY 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."
}
]
},
"CopyDone (F & B)": {
"type": "both",
"fields": [
{
"name": "Byte1('c')",
"type": "Byte1",
"description": "Identifies the message as a COPY-complete indicator.",
"value": "'c'"
},
{
"name": "Int32(4)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "4"
}
]
},
"CopyFail": {
"type": "frontend",
"fields": [
{
"name": "Byte1('f')",
"type": "Byte1",
"description": "Identifies the message as a COPY-failure indicator.",
"value": "'f'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "String",
"type": "String",
"description": "An error message to report as the cause of failure."
}
]
},
"CopyInResponse": {
"type": "backend",
"fields": [
{
"name": "Byte1('G')",
"type": "Byte1",
"description": "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).",
"value": "'G'"
},
{
"name": "Int32",
"type": "Int32",
"description": "0 indicates the overall COPY 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 COPY for more information."
},
{
"name": "Int16",
"type": "Int16",
"description": "The number of columns in the data to be copied (denoted N below)."
},
{
"name": "Int16[N]",
"type": "Int16",
"description": "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.",
"arraySize": "N"
}
]
},
"CopyOutResponse": {
"type": "backend",
"fields": [
{
"name": "Byte1('H')",
"type": "Byte1",
"description": "Identifies the message as a Start Copy Out response. This message will be followed by copy-out data.",
"value": "'H'"
},
{
"name": "Int32",
"type": "Int32",
"description": "0 indicates the overall COPY 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 COPY for more information."
},
{
"name": "Int16",
"type": "Int16",
"description": "The number of columns in the data to be copied (denoted N below)."
},
{
"name": "Int16[N]",
"type": "Int16",
"description": "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.",
"arraySize": "N"
}
]
},
"CopyBothResponse": {
"type": "backend",
"fields": [
{
"name": "Byte1('W')",
"type": "Byte1",
"description": "Identifies the message as a Start Copy Both response. This message is used only for Streaming Replication.",
"value": "'W'"
},
{
"name": "Int32",
"type": "Int32",
"description": "0 indicates the overall COPY 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 COPY for more information."
},
{
"name": "Int16",
"type": "Int16",
"description": "The number of columns in the data to be copied (denoted N below)."
},
{
"name": "Int16[N]",
"type": "Int16",
"description": "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.",
"arraySize": "N"
}
]
},
"DataRow": {
"type": "backend",
"fields": [
{
"name": "Byte1('D')",
"type": "Byte1",
"description": "Identifies the message as a data row.",
"value": "'D'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int16",
"type": "Int16",
"description": "The number of column values that follow (possibly zero)."
},
{
"name": "Int32",
"type": "Int32",
"description": "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."
},
{
"name": "Byten",
"type": "Byten",
"description": "The value of the column, in the format indicated by the associated format code. n is the above length."
}
]
},
"Describe": {
"type": "frontend",
"fields": [
{
"name": "Byte1('D')",
"type": "Byte1",
"description": "Identifies the message as a Describe command.",
"value": "'D'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Byte1",
"type": "Byte1",
"description": "'S' to describe a prepared statement; or 'P' to describe a portal."
},
{
"name": "String",
"type": "String",
"description": "The name of the prepared statement or portal to describe (an empty string selects the unnamed prepared statement or portal)."
}
]
},
"EmptyQueryResponse": {
"type": "backend",
"fields": [
{
"name": "Byte1('I')",
"type": "Byte1",
"description": "Identifies the message as a response to an empty query string. (This substitutes for CommandComplete.)",
"value": "'I'"
},
{
"name": "Int32(4)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "4"
}
]
},
"ErrorResponse": {
"type": "backend",
"fields": [
{
"name": "Byte1('E')",
"type": "Byte1",
"description": "Identifies the message as an error.",
"value": "'E'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Byte1",
"type": "Byte1",
"description": "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 Section 55.8. Since more field types might be added in future, frontends should silently ignore fields of unrecognized type."
},
{
"name": "String",
"type": "String",
"description": "The field value."
}
]
},
"Execute": {
"type": "frontend",
"fields": [
{
"name": "Byte1('E')",
"type": "Byte1",
"description": "Identifies the message as an Execute command.",
"value": "'E'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "String",
"type": "String",
"description": "The name of the portal to execute (an empty string selects the unnamed portal)."
},
{
"name": "Int32",
"type": "Int32",
"description": "Maximum number of rows to return, if portal contains a query that returns rows (ignored otherwise). Zero denotes “no limit”."
}
]
},
"Flush": {
"type": "frontend",
"fields": [
{
"name": "Byte1('H')",
"type": "Byte1",
"description": "Identifies the message as a Flush command.",
"value": "'H'"
},
{
"name": "Int32(4)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "4"
}
]
},
"FunctionCall": {
"type": "frontend",
"fields": [
{
"name": "Byte1('F')",
"type": "Byte1",
"description": "Identifies the message as a function call.",
"value": "'F'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int32",
"type": "Int32",
"description": "Specifies the object ID of the function to call."
},
{
"name": "Int16",
"type": "Int16",
"description": "The number of argument format codes that follow (denoted C 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."
},
{
"name": "Int16[C]",
"type": "Int16",
"description": "The argument format codes. Each must presently be zero (text) or one (binary).",
"arraySize": "C"
},
{
"name": "Int16",
"type": "Int16",
"description": "Specifies the number of arguments being supplied to the function."
},
{
"name": "Int32",
"type": "Int32",
"description": "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."
},
{
"name": "Byten",
"type": "Byten",
"description": "The value of the argument, in the format indicated by the associated format code. n is the above length."
},
{
"name": "Int16",
"type": "Int16",
"description": "The format code for the function result. Must presently be zero (text) or one (binary)."
}
]
},
"FunctionCallResponse": {
"type": "backend",
"fields": [
{
"name": "Byte1('V')",
"type": "Byte1",
"description": "Identifies the message as a function call result.",
"value": "'V'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int32",
"type": "Int32",
"description": "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."
},
{
"name": "Byten",
"type": "Byten",
"description": "The value of the function result, in the format indicated by the associated format code. n is the above length."
}
]
},
"GSSENCRequest": {
"type": "frontend",
"fields": [
{
"name": "Int32(8)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "8"
},
{
"name": "Int32(80877104)",
"type": "Int32",
"description": "The GSSAPI Encryption request code. The value is chosen to contain 1234 in the most significant 16 bits, and 5680 in the least significant 16 bits. (To avoid confusion, this code must not be the same as any protocol version number.)",
"value": "80877104"
}
]
},
"GSSResponse": {
"type": "frontend",
"fields": [
{
"name": "Byte1('p')",
"type": "Byte1",
"description": "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.",
"value": "'p'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Byten",
"type": "Byten",
"description": "GSSAPI/SSPI specific message data."
}
]
},
"NegotiateProtocolVersion": {
"type": "backend",
"fields": [
{
"name": "Byte1('v')",
"type": "Byte1",
"description": "Identifies the message as a protocol version negotiation message.",
"value": "'v'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int32",
"type": "Int32",
"description": "Newest minor protocol version supported by the server for the major protocol version requested by the client."
},
{
"name": "Int32",
"type": "Int32",
"description": "Number of protocol options not recognized by the server."
},
{
"name": "String",
"type": "String",
"description": "The option name."
}
]
},
"NoData": {
"type": "backend",
"fields": [
{
"name": "Byte1('n')",
"type": "Byte1",
"description": "Identifies the message as a no-data indicator.",
"value": "'n'"
},
{
"name": "Int32(4)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "4"
}
]
},
"NoticeResponse": {
"type": "backend",
"fields": [
{
"name": "Byte1('N')",
"type": "Byte1",
"description": "Identifies the message as a notice.",
"value": "'N'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Byte1",
"type": "Byte1",
"description": "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 Section 55.8. Since more field types might be added in future, frontends should silently ignore fields of unrecognized type."
},
{
"name": "String",
"type": "String",
"description": "The field value."
}
]
},
"NotificationResponse": {
"type": "backend",
"fields": [
{
"name": "Byte1('A')",
"type": "Byte1",
"description": "Identifies the message as a notification response.",
"value": "'A'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int32",
"type": "Int32",
"description": "The process ID of the notifying backend process."
},
{
"name": "String",
"type": "String",
"description": "The name of the channel that the notify has been raised on."
},
{
"name": "String",
"type": "String",
"description": "The “payload” string passed from the notifying process."
}
]
},
"ParameterDescription": {
"type": "backend",
"fields": [
{
"name": "Byte1('t')",
"type": "Byte1",
"description": "Identifies the message as a parameter description.",
"value": "'t'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int16",
"type": "Int16",
"description": "The number of parameters used by the statement (can be zero)."
},
{
"name": "Int32",
"type": "Int32",
"description": "Specifies the object ID of the parameter data type."
}
]
},
"ParameterStatus": {
"type": "backend",
"fields": [
{
"name": "Byte1('S')",
"type": "Byte1",
"description": "Identifies the message as a run-time parameter status report.",
"value": "'S'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "String",
"type": "String",
"description": "The name of the run-time parameter being reported."
},
{
"name": "String",
"type": "String",
"description": "The current value of the parameter."
}
]
},
"Parse": {
"type": "frontend",
"fields": [
{
"name": "Byte1('P')",
"type": "Byte1",
"description": "Identifies the message as a Parse command.",
"value": "'P'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "String",
"type": "String",
"description": "The name of the destination prepared statement (an empty string selects the unnamed prepared statement)."
},
{
"name": "String",
"type": "String",
"description": "The query string to be parsed."
},
{
"name": "Int16",
"type": "Int16",
"description": "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."
},
{
"name": "Int32",
"type": "Int32",
"description": "Specifies the object ID of the parameter data type. Placing a zero here is equivalent to leaving the type unspecified."
}
]
},
"ParseComplete": {
"type": "backend",
"fields": [
{
"name": "Byte1('1')",
"type": "Byte1",
"description": "Identifies the message as a Parse-complete indicator.",
"value": "'1'"
},
{
"name": "Int32(4)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "4"
}
]
},
"PasswordMessage": {
"type": "frontend",
"fields": [
{
"name": "Byte1('p')",
"type": "Byte1",
"description": "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.",
"value": "'p'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "String",
"type": "String",
"description": "The password (encrypted, if requested)."
}
]
},
"PortalSuspended": {
"type": "backend",
"fields": [
{
"name": "Byte1('s')",
"type": "Byte1",
"description": "Identifies the message as a portal-suspended indicator. Note this only appears if an Execute message's row-count limit was reached.",
"value": "'s'"
},
{
"name": "Int32(4)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "4"
}
]
},
"Query": {
"type": "frontend",
"fields": [
{
"name": "Byte1('Q')",
"type": "Byte1",
"description": "Identifies the message as a simple query.",
"value": "'Q'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "String",
"type": "String",
"description": "The query string itself."
}
]
},
"ReadyForQuery": {
"type": "backend",
"fields": [
{
"name": "Byte1('Z')",
"type": "Byte1",
"description": "Identifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle.",
"value": "'Z'"
},
{
"name": "Int32(5)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "5"
},
{
"name": "Byte1",
"type": "Byte1",
"description": "Current backend transaction status indicator. Possible values are 'I' if idle (not in a transaction block); 'T' if in a transaction block; or 'E' if in a failed transaction block (queries will be rejected until block is ended)."
}
]
},
"RowDescription": {
"type": "backend",
"fields": [
{
"name": "Byte1('T')",
"type": "Byte1",
"description": "Identifies the message as a row description.",
"value": "'T'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int16",
"type": "Int16",
"description": "Specifies the number of fields in a row (can be zero)."
},
{
"name": "String",
"type": "String",
"description": "The field name."
},
{
"name": "Int32",
"type": "Int32",
"description": "If the field can be identified as a column of a specific table, the object ID of the table; otherwise zero."
},
{
"name": "Int16",
"type": "Int16",
"description": "If the field can be identified as a column of a specific table, the attribute number of the column; otherwise zero."
},
{
"name": "Int32",
"type": "Int32",
"description": "The object ID of the field's data type."
},
{
"name": "Int16",
"type": "Int16",
"description": "The data type size (see pg_type.typlen). Note that negative values denote variable-width types."
},
{
"name": "Int32",
"type": "Int32",
"description": "The type modifier (see pg_attribute.atttypmod). The meaning of the modifier is type-specific."
},
{
"name": "Int16",
"type": "Int16",
"description": "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."
}
]
},
"SASLInitialResponse": {
"type": "frontend",
"fields": [
{
"name": "Byte1('p')",
"type": "Byte1",
"description": "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.",
"value": "'p'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "String",
"type": "String",
"description": "Name of the SASL authentication mechanism that the client selected."
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of SASL mechanism specific \"Initial Client Response\" that follows, or -1 if there is no Initial Response."
},
{
"name": "Byten",
"type": "Byten",
"description": "SASL mechanism specific \"Initial Response\"."
}
]
},
"SASLResponse": {
"type": "frontend",
"fields": [
{
"name": "Byte1('p')",
"type": "Byte1",
"description": "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.",
"value": "'p'"
},
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Byten",
"type": "Byten",
"description": "SASL mechanism specific message data."
}
]
},
"SSLRequest": {
"type": "frontend",
"fields": [
{
"name": "Int32(8)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "8"
},
{
"name": "Int32(80877103)",
"type": "Int32",
"description": "The SSL request code. The value is chosen to contain 1234 in the most significant 16 bits, and 5679 in the least significant 16 bits. (To avoid confusion, this code must not be the same as any protocol version number.)",
"value": "80877103"
}
]
},
"StartupMessage": {
"type": "frontend",
"fields": [
{
"name": "Int32",
"type": "Int32",
"description": "Length of message contents in bytes, including self."
},
{
"name": "Int32(196608)",
"type": "Int32",
"description": "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).",
"value": "196608"
},
{
"name": "String",
"type": "String",
"description": "Used to connect in streaming replication mode, where a small set of replication commands can be issued instead of SQL statements. Value can be true, false, or database, and the default is false. See Section 55.4 for details."
},
{
"name": "String",
"type": "String",
"description": "Used to connect in streaming replication mode, where a small set of replication commands can be issued instead of SQL statements. Value can be true, false, or database, and the default is false. See Section 55.4 for details."
}
]
},
"Sync": {
"type": "frontend",
"fields": [
{
"name": "Byte1('S')",
"type": "Byte1",
"description": "Identifies the message as a Sync command.",
"value": "'S'"
},
{
"name": "Int32(4)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "4"
}
]
},
"Terminate": {
"type": "frontend",
"fields": [
{
"name": "Byte1('X')",
"type": "Byte1",
"description": "Identifies the message as a termination.",
"value": "'X'"
},
{
"name": "Int32(4)",
"type": "Int32",
"description": "Length of message contents in bytes, including self.",
"value": "4"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment