{"Entry":{"collection":"protocol","key":"copybothresponse-b","name":"CopyBothResponse","aliases":["CopyBothResponse","Byte1('W')"],"metadata":{"aliases":["CopyBothResponse","Byte1('W')"],"category":"Backend messages","content_hash":"0c098b173922591f2fe40e91daeacaeda11bc99b37c7251888efb89dbeae98b8","imported_at":"2026-09-30T00:40:44.449604+08:00","name":"CopyBothResponse","name_zh":"","slug":"copybothresponse-b","summary":"CopyBothResponse is a backend protocol message. Identifies the message as a Start Copy Both response. This message is used only for Streaming Replication."}},"Definition":{"Collection":"protocol","Key":"copybothresponse-b","SourceDatabase":"center","Version":"18","SourceTable":"protocol_message","SourceKey":"copybothresponse-b","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"comparison_data":{"direction":"B","fields":[{"description":"Identifies the message as a Start Copy Both response. This message is used only for Streaming Replication.","format":"Byte1('W')"},{"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":"2c78768b935fbd770aa730611fc424919a4773d82ddeb631025f0ccbaf15aab4","description":["CopyBothResponse is a backend protocol message. Identifies the message as a Start Copy Both response. This message is used only for Streaming Replication."],"direction":"B","facts":[{"label":"Direction","value":"Backend → frontend"},{"label":"First wire field","value":"Byte1('W')"},{"label":"Field entries","value":"5"},{"label":"Documented flow contexts","value":"COPY Operations"}],"fields":[{"description":"Identifies the message as a Start Copy Both response. This message is used only for Streaming Replication.","format":"Byte1('W')"},{"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('W')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message as a Start Copy Both response. This message is used only for Streaming Replication.\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":"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"}],"signature":"CopyBothResponse (B)","sources":[{"label":"PostgreSQL 18 English manual","path":"protocol-message-formats.html","sha256":"53f37652ac2c089e30ada87d8aee7bdd0f26695b03f275302e526a807d2a1f23","url":"/docs/18/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-COPYBOTHRESPONSE"}],"tables":[{"columns":[{"key":"c0","label":"Position"},{"key":"c1","label":"Format"},{"key":"c2","label":"Meaning"}],"key":"fields","rows":[{"c0":"1","c1":"Byte1('W')","c2":"Identifies the message as a Start Copy Both response. This message is used only for Streaming Replication."},{"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"}]},"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-COPYBOTHRESPONSE"}]},"MeasuredEvidence":{}},"Text":{"Collection":"protocol","Key":"copybothresponse-b","SourceDatabase":"center","Version":"18","Locale":"en","Title":"CopyBothResponse","Summary":"CopyBothResponse is a backend protocol message. Identifies the message as a Start Copy Both response. This message is used only for Streaming Replication.","BodyHTML":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003cspan\u003eByte1(\u0026#39;W\u0026#39;)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message as a Start Copy Both response. This message is used only for Streaming Replication.\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":"67dc316472127837aae772ccbd0322e7da9cd8bdb61fb6052a5d07a101334f17","Payload":{"description":["CopyBothResponse is a backend protocol message. Identifies the message as a Start Copy Both response. This message is used only for Streaming Replication."],"manual_html":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('W')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message as a Start Copy Both response. This message is used only for Streaming Replication.\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":"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('W')","c2":"Identifies the message as a Start Copy Both response. This message is used only for Streaming Replication."},{"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":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
