{"Entry":{"collection":"protocol","key":"copyinresponse-b","name":"CopyInResponse","aliases":["CopyInResponse","Byte1('G')"],"metadata":{"aliases":["CopyInResponse","Byte1('G')"],"category":"Backend messages","content_hash":"a0c426ffbec02cfe665b16c691b5a72b9e399b717867902b9eac066c4b75471d","derived_content_hash":"94ad14062d8b2b4bebffa27fd785f9ee16cb4c2b4de9e8fecab1cc24377bdb0c","imported_at":"2026-09-30T00:40:44.453356+08:00","name":"CopyInResponse","name_zh":"","slug":"copyinresponse-b","summary":"CopyInResponse is a backend protocol message. 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)."}},"Definition":{"Collection":"protocol","Key":"copyinresponse-b","SourceDatabase":"center","Version":"18","SourceTable":"protocol_message","SourceKey":"copyinresponse-b","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"comparison_data":{"direction":"B","fields":[{"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).","format":"Byte1('G')"},{"description":"Length of message contents in bytes, including self.","format":"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.","format":"Int8"},{"description":"The number of columns in the data to be copied (denoted N below).","format":"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.","format":"Int16[ N ]"}]},"comparison_hash":"e94b6dcedbcee4d9e8d179f78b0bfb9de707a5b5c668419c65b88ebe0a164a44","description":["CopyInResponse is a backend protocol message. 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)."],"description_zh":"Byte1('G') 将该消息标识为开始 COPY 输入的响应。前端此时必须发送 COPY 输入数据（如果尚未准备好，应发送 CopyFail 消息）。 Int32 消息内容的长度（以字节为单位），包括其自身。 Int8 0 表示整体 COPY 格式是文本的（行由换行符分隔，列由分隔符分隔等）。1 表示整体复制格式是二进制的（类似于 DataRow 格式）。更多信息请参见 COPY 。 Int16 要复制的数据中的列数（以下用 N 表示）。 Int16[ N ] 各列使用的格式代码。目前每个代码必须为零（文本）或一（二进制）。如果整体复制格式为文本，则所有代码都必须为零。","description_zh_html":"\u003cp\u003e协议消息 CopyInResponse (B)。\u003c/p\u003e\u003ch3\u003e同版本中文手册定义\u003c/h3\u003e\u003cdd\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('G')\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         将该消息标识为开始 COPY 输入的响应。前端此时必须发送 COPY 输入数据（如果尚未准备好，应发送 CopyFail 消息）。\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\"\u003eInt8\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         0 表示整体 \u003ccode class=\"command\"\u003eCOPY\u003c/code\u003e 格式是文本的（行由换行符分隔，列由分隔符分隔等）。1 表示整体复制格式是二进制的（类似于 DataRow 格式）。更多信息请参见 \u003ca class=\"xref\" href=\"/zh/docs/18/sql-copy.html\"\u003e\u003cspan class=\"refentrytitle\"\u003eCOPY\u003c/span\u003e\u003c/a\u003e。\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\u003eN\u003c/code\u003e\u003c/em\u003e 表示）。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16[\u003cem class=\"replaceable\"\u003e\u003ccode\u003eN\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-COPYINRESPONSE\"\u003e查看完整中文手册与上下文\u003c/a\u003e。\u003c/p\u003e","direction":"B","facts":[{"label":"Direction","value":"Backend → frontend"},{"label":"First wire field","value":"Byte1('G')"},{"label":"Field entries","value":"5"},{"label":"Documented flow contexts","value":"Simple Query; COPY Operations"}],"facts_zh":[{"label":"方向","value":"后端 → 前端"},{"label":"首个线上协议字段","value":"Byte1('G')"},{"label":"字段条目","value":"5"},{"label":"手册中的交互阶段","value":"简单查询；COPY 操作"}],"fields":[{"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).","format":"Byte1('G')"},{"description":"Length of message contents in bytes, including self.","format":"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.","format":"Int8"},{"description":"The number of columns in the data to be copied (denoted N below).","format":"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.","format":"Int16[ N ]"}],"manual_html":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('G')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies 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).\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\"\u003eInt8\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003e0 indicates the overall \u003ccode class=\"command\"\u003eCOPY\u003c/code\u003e 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 \u003ca class=\"xref\" href=\"/docs/18/sql-copy.html\" title=\"COPY\"\u003e\u003cspan class=\"refentrytitle\"\u003eCOPY\u003c/span\u003e\u003c/a\u003e for more information.\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 columns in the data to be copied (denoted \u003cem class=\"replaceable\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e below).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16[\u003cem class=\"replaceable\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e]\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe 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.\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":"Simple Query","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-SIMPLE-QUERY"},{"label":"COPY Operations","url":"/docs/18/protocol-flow.html#PROTOCOL-COPY"}],"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":"CopyInResponse (B)","sources":[{"label":"PostgreSQL 18 English manual","path":"protocol-message-formats.html","sha256":"53f37652ac2c089e30ada87d8aee7bdd0f26695b03f275302e526a807d2a1f23","url":"/docs/18/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-COPYINRESPONSE"}],"tables":[{"columns":[{"key":"c0","label":"Position"},{"key":"c1","label":"Format"},{"key":"c2","label":"Meaning"}],"key":"fields","rows":[{"c0":"1","c1":"Byte1('G')","c2":"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)."},{"c0":"2","c1":"Int32","c2":"Length of message contents in bytes, including self."},{"c0":"3","c1":"Int8","c2":"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."},{"c0":"4","c1":"Int16","c2":"The number of columns in the data to be copied (denoted N below)."},{"c0":"5","c1":"Int16[ N ]","c2":"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."}],"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('G')","c2":"将该消息标识为开始 COPY 输入的响应。前端此时必须发送 COPY 输入数据（如果尚未准备好，应发送 CopyFail 消息）。"},{"c0":"2","c1":"Int32","c2":"消息内容的长度（以字节为单位），包括其自身。"},{"c0":"3","c1":"Int8","c2":"0 表示 COPY 的整体格式为文本（用换行符分隔行、用分隔字符分隔列等）；1 表示整体格式为二进制（类似 DataRow 格式）。详情参见 COPY。"},{"c0":"4","c1":"Int16","c2":"要复制的数据中的列数（以下用 N 表示）。"},{"c0":"5","c1":"Int16[ N ]","c2":"各列使用的格式代码。目前每个代码必须为零（文本）或一（二进制）。如果整体复制格式为文本，则所有代码都必须为零。"}],"title":"按手册顺序排列的线上协议字段"}],"zh_from":{"authored_translation":"source-derived-identity","body_sha256":"a84a7be7c805e01739dad4eae6c7e6ade1c73891b3aff1e40662c0c70407bc66","kind":"same-version-chinese-manual-with-source-derived-identity","manual":{"anchor":"PROTOCOL-MESSAGE-FORMATS-COPYINRESPONSE","build_id":107,"extraction":"exact-definition","fragment_sha256":"3f6634210f667222fe0b4fb2b284fb2add87e28d195ba58007e703f8846c7994","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-COPYINRESPONSE","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-COPYINRESPONSE"}]},"MeasuredEvidence":{}},"Text":{"Collection":"protocol","Key":"copyinresponse-b","SourceDatabase":"center","Version":"18","Locale":"en","Title":"CopyInResponse","Summary":"CopyInResponse is a backend protocol message. 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).","BodyHTML":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003cspan\u003eByte1(\u0026#39;G\u0026#39;)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies 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).\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\u003eInt8\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003e0 indicates the overall \u003ccode\u003eCOPY\u003c/code\u003e 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 \u003ca href=\"/docs/18/sql-copy.html\" title=\"COPY\" rel=\"nofollow\"\u003e\u003cspan\u003eCOPY\u003c/span\u003e\u003c/a\u003e for more information.\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 columns in the data to be copied (denoted \u003cem\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e below).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eInt16[\u003cem\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e]\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe 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.\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":"43c839427db44b22d4a4547a946388e3128bc3c61c847d01283ad3c429dfd0d3","Payload":{"description":["CopyInResponse is a backend protocol message. 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)."],"manual_html":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('G')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies 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).\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\"\u003eInt8\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003e0 indicates the overall \u003ccode class=\"command\"\u003eCOPY\u003c/code\u003e 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 \u003ca class=\"xref\" href=\"/docs/18/sql-copy.html\" title=\"COPY\"\u003e\u003cspan class=\"refentrytitle\"\u003eCOPY\u003c/span\u003e\u003c/a\u003e for more information.\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 columns in the data to be copied (denoted \u003cem class=\"replaceable\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e below).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt16[\u003cem class=\"replaceable\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e]\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eThe 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.\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":"Simple Query","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-SIMPLE-QUERY"},{"label":"COPY Operations","url":"/docs/18/protocol-flow.html#PROTOCOL-COPY"}],"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('G')","c2":"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)."},{"c0":"2","c1":"Int32","c2":"Length of message contents in bytes, including self."},{"c0":"3","c1":"Int8","c2":"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."},{"c0":"4","c1":"Int16","c2":"The number of columns in the data to be copied (denoted N below)."},{"c0":"5","c1":"Int16[ N ]","c2":"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."}],"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}
