{"Entry":{"collection":"protocol","key":"bind-f","name":"Bind","aliases":["Bind","Byte1('B')"],"metadata":{"aliases":["Bind","Byte1('B')"],"category":"Frontend messages","content_hash":"c8892156715f8f00b96d7adb85376f1f161059d212fe18d572b591e53c151ba9","derived_content_hash":"e9d1aef5073ff3e869a193e4321944f4b7e348fad24c1cdae58f17e39ce6f133","imported_at":"2026-09-30T00:40:44.520411+08:00","name":"Bind","name_zh":"","slug":"bind-f","summary":"Bind is a frontend protocol message. Identifies the message as a Bind command."}},"Definition":{"Collection":"protocol","Key":"bind-f","SourceDatabase":"center","Version":"18","SourceTable":"protocol_message","SourceKey":"bind-f","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"comparison_data":{"direction":"F","fields":[{"description":"Identifies the message as a Bind command.","format":"Byte1('B')"},{"description":"Length of message contents in bytes, including self.","format":"Int32"},{"description":"The name of the destination portal (an empty string selects the unnamed portal).","format":"String"},{"description":"The name of the source prepared statement (an empty string selects the unnamed prepared statement).","format":"String"},{"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.","format":"Int16"},{"description":"The parameter format codes. Each must presently be zero (text) or one (binary).","format":"Int16[ C ]"},{"description":"The number of parameter values that follow (possibly zero). This must match the number of parameters needed by the query.","format":"Int16"},{"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.","format":"Int32"},{"description":"The value of the parameter, in the format indicated by the associated format code. n is the above length.","format":"Byte n"},{"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.","format":"Int16"},{"description":"The result-column format codes. Each must presently be zero (text) or one (binary).","format":"Int16[ R ]"}]},"comparison_hash":"c8b0c2d1702e2be51f0c868a6594754e9fee7debc6c10c6dab9aee46235c1a22","description":["Bind is a frontend protocol message. Identifies the message as a Bind command."],"description_zh":"Byte1('B') 将该消息标识为 Bind 命令。 Int32 消息内容的长度（以字节为单位），包括其自身。 String 目标 portal 的名称（空字符串选择未命名的 portal）。 String 源预备语句的名称（空字符串选择未命名的预备语句）。 Int16 后续参数格式代码的数量（下文以 C 表示）。可以为零，表示没有参数，或者所有参数都使用默认格式（文本）；也可以为一，此时指定的格式代码应用于所有参数；还可以等于实际参数数量。 Int16[ C ] 参数格式代码。目前每个格式代码必须为零（文本）或一（二进制）。 Int16 后续参数值的数量（可以为零）。必须与查询所需的参数数量一致。 接下来，每个参数都有以下一对字段： Int32 参数值的长度，以字节为单位（不包括此长度字段本身）。可以为零。特殊值 -1 表示 NULL 参数值。为 NULL 时，后面不再有值的字节。 Byte n 参数值，格式由对应的格式代码指明。 n 为上述长度。 最后一个参数之后是以下字段： Int16 后续结果列格式代码的数量（下文以 R 表示）。可以为零，表示没有结果列，或者所有结果列都应使用默认格式（文本）；也可以为一，此时指定的格式代码应用于所有结果列（如果有）；还可以等于查询实际的结果列数量。 Int16[ R ] 结果列格式代码。目前每个格式代码必须为零（文本）或一（二进制）。","description_zh_html":"\u003cp\u003e协议消息 Bind (F)。\u003c/p\u003e\u003ch3\u003e同版本中文手册定义\u003c/h3\u003e\u003cdd\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('B')\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         将该消息标识为 Bind 命令。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         消息内容的长度（以字节为单位），包括其自身。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eString\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         目标 portal 的名称（空字符串选择未命名的 portal）。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eString\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         源预备语句的名称（空字符串选择未命名的预备语句）。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         后续参数格式代码的数量（下文以 \u003cem class=\"replaceable\"\u003e\u003ccode\u003eC\u003c/code\u003e\u003c/em\u003e 表示）。可以为零，表示没有参数，或者所有参数都使用默认格式（文本）；也可以为一，此时指定的格式代码应用于所有参数；还可以等于实际参数数量。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16[\u003cem class=\"replaceable\"\u003e\u003ccode\u003eC\u003c/code\u003e\u003c/em\u003e]\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         参数格式代码。目前每个格式代码必须为零（文本）或一（二进制）。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         后续参数值的数量（可以为零）。必须与查询所需的参数数量一致。\n        \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003e\n      接下来，每个参数都有以下一对字段：\n     \u003c/p\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         参数值的长度，以字节为单位（不包括此长度字段本身）。可以为零。特殊值 -1 表示 NULL 参数值。为 NULL 时，后面不再有值的字节。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eByte\u003cem class=\"replaceable\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         参数值，格式由对应的格式代码指明。\u003cem class=\"replaceable\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e 为上述长度。\n        \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003e\n      最后一个参数之后是以下字段：\n     \u003c/p\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         后续结果列格式代码的数量（下文以 \u003cem class=\"replaceable\"\u003e\u003ccode\u003eR\u003c/code\u003e\u003c/em\u003e 表示）。可以为零，表示没有结果列，或者所有结果列都应使用默认格式（文本）；也可以为一，此时指定的格式代码应用于所有结果列（如果有）；还可以等于查询实际的结果列数量。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16[\u003cem class=\"replaceable\"\u003e\u003ccode\u003eR\u003c/code\u003e\u003c/em\u003e]\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         结果列格式代码。目前每个格式代码必须为零（文本）或一（二进制）。\n        \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/dd\u003e\u003cp\u003e\u003ca href=\"/zh/docs/18/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-BIND\"\u003e查看完整中文手册与上下文\u003c/a\u003e。\u003c/p\u003e","direction":"F","facts":[{"label":"Direction","value":"Frontend → backend"},{"label":"First wire field","value":"Byte1('B')"},{"label":"Field entries","value":"11"},{"label":"Documented flow contexts","value":"Extended Query; Function Call"}],"facts_zh":[{"label":"方向","value":"前端 → 后端"},{"label":"首个线上协议字段","value":"Byte1('B')"},{"label":"字段条目","value":"11"},{"label":"手册中的交互阶段","value":"扩展查询；函数调用"}],"fields":[{"description":"Identifies the message as a Bind command.","format":"Byte1('B')"},{"description":"Length of message contents in bytes, including self.","format":"Int32"},{"description":"The name of the destination portal (an empty string selects the unnamed portal).","format":"String"},{"description":"The name of the source prepared statement (an empty string selects the unnamed prepared statement).","format":"String"},{"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.","format":"Int16"},{"description":"The parameter format codes. Each must presently be zero (text) or one (binary).","format":"Int16[ C ]"},{"description":"The number of parameter values that follow (possibly zero). This must match the number of parameters needed by the query.","format":"Int16"},{"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.","format":"Int32"},{"description":"The value of the parameter, in the format indicated by the associated format code. n is the above length.","format":"Byte n"},{"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.","format":"Int16"},{"description":"The result-column format codes. Each must presently be zero (text) or one (binary).","format":"Int16[ R ]"}],"manual_html":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('B')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message as a Bind command.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eLength of message contents in bytes, including self.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eString\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe name of the destination portal (an empty string selects the unnamed portal).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eString\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe name of the source prepared statement (an empty string selects the unnamed prepared statement).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe number of parameter format codes that follow (denoted \u003cem class=\"replaceable\"\u003e\u003ccode\u003eC\u003c/code\u003e\u003c/em\u003e 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.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16[\u003cem class=\"replaceable\"\u003e\u003ccode\u003eC\u003c/code\u003e\u003c/em\u003e]\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe parameter format codes. Each must presently be zero (text) or one (binary).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe number of parameter values that follow (possibly zero). This must match the number of parameters needed by the query.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cp\u003eNext, the following pair of fields appear for each parameter:\u003c/p\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe 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.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte\u003cem class=\"replaceable\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe value of the parameter, in the format indicated by the associated format code. \u003cem class=\"replaceable\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e is the above length.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cp\u003eAfter the last parameter, the following fields appear:\u003c/p\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe number of result-column format codes that follow (denoted \u003cem class=\"replaceable\"\u003e\u003ccode\u003eR\u003c/code\u003e\u003c/em\u003e 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.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16[\u003cem class=\"replaceable\"\u003e\u003ccode\u003eR\u003c/code\u003e\u003c/em\u003e]\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe result-column format codes. Each must presently be zero (text) or one (binary).\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/dd\u003e\u003c/dl\u003e","manual_path":"/docs/18/protocol-message-formats.html","related":[{"label":"Protocol flow and exchange examples","url":"/docs/18/protocol-flow.html"},{"label":"Protocol overview","url":"/docs/18/protocol-overview.html"},{"label":"Extended Query","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY"},{"label":"Function Call","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-FUNCTION-CALL"}],"release":{"channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sections":[{"paragraphs":["The complete definition below retains repetition, counts and conditional fields. A numbered table row is a documented field definition, not a fixed byte offset. Integer encodings and flow rules follow the same-version protocol chapter."],"title":"Framing and repetition"}],"sections_zh":[{"paragraphs":["下方完整定义保留重复项、计数与条件字段。表格行号表示文档中的字段定义，并非固定字节偏移量。整数编码与交互流程以同版本协议章节为准。"],"title":"消息边界与重复字段"}],"signature":"Bind (F)","sources":[{"label":"PostgreSQL 18 English manual","path":"protocol-message-formats.html","sha256":"53f37652ac2c089e30ada87d8aee7bdd0f26695b03f275302e526a807d2a1f23","url":"/docs/18/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-BIND"}],"tables":[{"columns":[{"key":"c0","label":"Position"},{"key":"c1","label":"Format"},{"key":"c2","label":"Meaning"}],"key":"fields","rows":[{"c0":"1","c1":"Byte1('B')","c2":"Identifies the message as a Bind command."},{"c0":"2","c1":"Int32","c2":"Length of message contents in bytes, including self."},{"c0":"3","c1":"String","c2":"The name of the destination portal (an empty string selects the unnamed portal)."},{"c0":"4","c1":"String","c2":"The name of the source prepared statement (an empty string selects the unnamed prepared statement)."},{"c0":"5","c1":"Int16","c2":"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."},{"c0":"6","c1":"Int16[ C ]","c2":"The parameter format codes. Each must presently be zero (text) or one (binary)."},{"c0":"7","c1":"Int16","c2":"The number of parameter values that follow (possibly zero). This must match the number of parameters needed by the query."},{"c0":"8","c1":"Int32","c2":"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."},{"c0":"9","c1":"Byte n","c2":"The value of the parameter, in the format indicated by the associated format code. n is the above length."},{"c0":"10","c1":"Int16","c2":"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."},{"c0":"11","c1":"Int16[ R ]","c2":"The result-column format codes. Each must presently be zero (text) or one (binary)."}],"title":"Wire fields in documented order"}],"tables_zh":[{"columns":[{"key":"c0","label":"位置"},{"key":"c1","label":"格式"},{"key":"c2","label":"含义"}],"key":"fields","rows":[{"c0":"1","c1":"Byte1('B')","c2":"将该消息标识为 Bind 命令。"},{"c0":"2","c1":"Int32","c2":"消息内容的长度（以字节为单位），包括其自身。"},{"c0":"3","c1":"字符串","c2":"目标 portal 的名称（空字符串选择未命名的 portal）。"},{"c0":"4","c1":"字符串","c2":"源预备语句的名称（空字符串选择未命名的预备语句）。"},{"c0":"5","c1":"Int16","c2":"后续参数格式代码的数量（下文以 C 表示）。可以为零，表示没有参数，或者所有参数都使用默认格式（文本）；也可以为一，此时指定的格式代码应用于所有参数；还可以等于实际参数数量。"},{"c0":"6","c1":"Int16[ C ]","c2":"参数格式代码。目前每个格式代码必须为零（文本）或一（二进制）。"},{"c0":"7","c1":"Int16","c2":"后续参数值的数量（可以为零）。必须与查询所需的参数数量一致。"},{"c0":"8","c1":"Int32","c2":"参数值的长度，以字节为单位（不包括此长度字段本身）。可以为零。特殊值 -1 表示 NULL 参数值。为 NULL 时，后面不再有值的字节。"},{"c0":"9","c1":"Byte n","c2":"参数值，格式由对应的格式代码指明。 n 为上述长度。"},{"c0":"10","c1":"Int16","c2":"后续结果列格式代码的数量（下文以 R 表示）。可以为零，表示没有结果列，或者所有结果列都应使用默认格式（文本）；也可以为一，此时指定的格式代码应用于所有结果列（如果有）；还可以等于查询实际的结果列数量。"},{"c0":"11","c1":"Int16[ R ]","c2":"结果列格式代码。目前每个格式代码必须为零（文本）或一（二进制）。"}],"title":"按手册顺序排列的线上协议字段"}],"zh_from":{"authored_translation":"source-derived-identity","body_sha256":"b49abffc30a5d820177cfe679866973bb0e387aac58e7daa550538f096227d8b","kind":"same-version-chinese-manual-with-source-derived-identity","manual":{"anchor":"PROTOCOL-MESSAGE-FORMATS-BIND","build_id":107,"extraction":"exact-definition","fragment_sha256":"e89171f1a99fdf42e45242f9a62cd12369ea082e18155dab3a5e582835ccfe93","locale":"zh-Hans","page_key":"protocol-message-formats.html","source_hash":"0be0a37b38d80c96c157ca9fcfe9222995654664aad8136f7ac2b1b552f6753a","source_revision":"unknown:rendered-translation-baseline","translated_from_revision":null,"translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","url":"/zh/docs/18/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-BIND","version":"18"},"runtime_rerun":false,"source_facts_revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}},"ManualEvidence":{"manual_path":"/docs/18/protocol-message-formats.html","release":{"channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sources":[{"label":"PostgreSQL 18 English manual","path":"protocol-message-formats.html","sha256":"53f37652ac2c089e30ada87d8aee7bdd0f26695b03f275302e526a807d2a1f23","url":"/docs/18/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-BIND"}]},"MeasuredEvidence":{}},"Text":{"Collection":"protocol","Key":"bind-f","SourceDatabase":"center","Version":"18","Locale":"en","Title":"Bind","Summary":"Bind is a frontend protocol message. Identifies the message as a Bind command.","BodyHTML":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003cspan\u003eByte1(\u0026#39;B\u0026#39;)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message as a Bind command.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eInt32\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eLength of message contents in bytes, including self.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eString\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe name of the destination portal (an empty string selects the unnamed portal).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eString\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe name of the source prepared statement (an empty string selects the unnamed prepared statement).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eInt16\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe number of parameter format codes that follow (denoted \u003cem\u003e\u003ccode\u003eC\u003c/code\u003e\u003c/em\u003e 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.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eInt16[\u003cem\u003e\u003ccode\u003eC\u003c/code\u003e\u003c/em\u003e]\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe parameter format codes. Each must presently be zero (text) or one (binary).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eInt16\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe number of parameter values that follow (possibly zero). This must match the number of parameters needed by the query.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cp\u003eNext, the following pair of fields appear for each parameter:\u003c/p\u003e\n\u003cdiv\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003cspan\u003eInt32\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe 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.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eByte\u003cem\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe value of the parameter, in the format indicated by the associated format code. \u003cem\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e is the above length.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cp\u003eAfter the last parameter, the following fields appear:\u003c/p\u003e\n\u003cdiv\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003cspan\u003eInt16\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe number of result-column format codes that follow (denoted \u003cem\u003e\u003ccode\u003eR\u003c/code\u003e\u003c/em\u003e 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.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eInt16[\u003cem\u003e\u003ccode\u003eR\u003c/code\u003e\u003c/em\u003e]\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe result-column format codes. Each must presently be zero (text) or one (binary).\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/dd\u003e\u003c/dl\u003e","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","ContentHash":"c0b7daf3adddc39277697426b542421dc31353619c371923e32ba0746a00bea0","Payload":{"description":["Bind is a frontend protocol message. Identifies the message as a Bind command."],"manual_html":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('B')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message as a Bind command.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eLength of message contents in bytes, including self.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eString\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe name of the destination portal (an empty string selects the unnamed portal).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eString\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe name of the source prepared statement (an empty string selects the unnamed prepared statement).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe number of parameter format codes that follow (denoted \u003cem class=\"replaceable\"\u003e\u003ccode\u003eC\u003c/code\u003e\u003c/em\u003e 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.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16[\u003cem class=\"replaceable\"\u003e\u003ccode\u003eC\u003c/code\u003e\u003c/em\u003e]\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe parameter format codes. Each must presently be zero (text) or one (binary).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe number of parameter values that follow (possibly zero). This must match the number of parameters needed by the query.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cp\u003eNext, the following pair of fields appear for each parameter:\u003c/p\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe 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.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte\u003cem class=\"replaceable\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe value of the parameter, in the format indicated by the associated format code. \u003cem class=\"replaceable\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e is the above length.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cp\u003eAfter the last parameter, the following fields appear:\u003c/p\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe number of result-column format codes that follow (denoted \u003cem class=\"replaceable\"\u003e\u003ccode\u003eR\u003c/code\u003e\u003c/em\u003e 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.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16[\u003cem class=\"replaceable\"\u003e\u003ccode\u003eR\u003c/code\u003e\u003c/em\u003e]\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe result-column format codes. Each must presently be zero (text) or one (binary).\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/dd\u003e\u003c/dl\u003e","related":[{"label":"Protocol flow and exchange examples","url":"/docs/18/protocol-flow.html"},{"label":"Protocol overview","url":"/docs/18/protocol-overview.html"},{"label":"Extended Query","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY"},{"label":"Function Call","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-FUNCTION-CALL"}],"sections":[{"paragraphs":["The complete definition below retains repetition, counts and conditional fields. A numbered table row is a documented field definition, not a fixed byte offset. Integer encodings and flow rules follow the same-version protocol chapter."],"title":"Framing and repetition"}],"tables":[{"columns":[{"key":"c0","label":"Position"},{"key":"c1","label":"Format"},{"key":"c2","label":"Meaning"}],"key":"fields","rows":[{"c0":"1","c1":"Byte1('B')","c2":"Identifies the message as a Bind command."},{"c0":"2","c1":"Int32","c2":"Length of message contents in bytes, including self."},{"c0":"3","c1":"String","c2":"The name of the destination portal (an empty string selects the unnamed portal)."},{"c0":"4","c1":"String","c2":"The name of the source prepared statement (an empty string selects the unnamed prepared statement)."},{"c0":"5","c1":"Int16","c2":"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."},{"c0":"6","c1":"Int16[ C ]","c2":"The parameter format codes. Each must presently be zero (text) or one (binary)."},{"c0":"7","c1":"Int16","c2":"The number of parameter values that follow (possibly zero). This must match the number of parameters needed by the query."},{"c0":"8","c1":"Int32","c2":"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."},{"c0":"9","c1":"Byte n","c2":"The value of the parameter, in the format indicated by the associated format code. n is the above length."},{"c0":"10","c1":"Int16","c2":"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."},{"c0":"11","c1":"Int16[ R ]","c2":"The result-column format codes. Each must presently be zero (text) or one (binary)."}],"title":"Wire fields in documented order"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
