{"Entry":{"collection":"protocol","key":"readyforquery-b","name":"ReadyForQuery","aliases":["ReadyForQuery","Byte1('Z')"],"metadata":{"aliases":["ReadyForQuery","Byte1('Z')"],"category":"Backend messages","content_hash":"cf441ac0984b46de3d4678a2e0980150be68c43cc1b22f9519de9f50921768c4","derived_content_hash":"b18cd90a8eb6e0b68a6660aeb0ceff2e28d3c5e756995048b01c2279872f92cd","imported_at":"2026-09-30T00:40:44.504362+08:00","name":"ReadyForQuery","name_zh":"","slug":"readyforquery-b","summary":"ReadyForQuery is a backend protocol message. Identifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle."}},"Definition":{"Collection":"protocol","Key":"readyforquery-b","SourceDatabase":"center","Version":"18","SourceTable":"protocol_message","SourceKey":"readyforquery-b","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"comparison_data":{"direction":"B","fields":[{"description":"Identifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle.","format":"Byte1('Z')"},{"description":"Length of message contents in bytes, including self.","format":"Int32(5)"},{"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).","format":"Byte1"}]},"comparison_hash":"591e8768a3731f543bd4b28a2f7f0ca07e52f086608af4311e2022224d97a61f","description":["ReadyForQuery is a backend protocol message. Identifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle."],"description_zh":"Byte1('Z') 标识消息类型。ReadyForQuery 在后端准备好进行新的查询周期时发送。 Int32(5) 消息内容的长度（以字节为单位），包括其自身。 Byte1 当前后端事务状态指示器。可能的值为' I '，如果空闲（不在事务块中）；' T '，如果在事务块中；或' E '，如果在失败的事务块中（查询将被拒绝，直到块结束）。","description_zh_html":"\u003cp\u003e协议消息 ReadyForQuery (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('Z')\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         标识消息类型。ReadyForQuery 在后端准备好进行新的查询周期时发送。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32(5)\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         消息内容的长度（以字节为单位），包括其自身。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         当前后端事务状态指示器。可能的值为'\u003ccode class=\"literal\"\u003eI\u003c/code\u003e'，如果空闲（不在事务块中）；'\u003ccode class=\"literal\"\u003eT\u003c/code\u003e'，如果在事务块中；或'\u003ccode class=\"literal\"\u003eE\u003c/code\u003e'，如果在失败的事务块中（查询将被拒绝，直到块结束）。\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-READYFORQUERY\"\u003e查看完整中文手册与上下文\u003c/a\u003e。\u003c/p\u003e","direction":"B","facts":[{"label":"Direction","value":"Backend → frontend"},{"label":"First wire field","value":"Byte1('Z')"},{"label":"Field entries","value":"3"},{"label":"Documented flow contexts","value":"Start-up; Simple Query; Extended Query; Pipelining; Function Call; COPY Operations; Asynchronous Operations"}],"facts_zh":[{"label":"方向","value":"后端 → 前端"},{"label":"首个线上协议字段","value":"Byte1('Z')"},{"label":"字段条目","value":"3"},{"label":"手册中的交互阶段","value":"启动；简单查询；扩展查询；流水线；函数调用；COPY 操作；异步操作"}],"fields":[{"description":"Identifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle.","format":"Byte1('Z')"},{"description":"Length of message contents in bytes, including self.","format":"Int32(5)"},{"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).","format":"Byte1"}],"manual_html":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('Z')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32(5)\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\"\u003eByte1\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eCurrent backend transaction status indicator. Possible values are '\u003ccode class=\"literal\"\u003eI\u003c/code\u003e' if idle (not in a transaction block); '\u003ccode class=\"literal\"\u003eT\u003c/code\u003e' if in a transaction block; or '\u003ccode class=\"literal\"\u003eE\u003c/code\u003e' if in a failed transaction block (queries will be rejected until block is ended).\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":"Start-up","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-START-UP"},{"label":"Simple Query","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-SIMPLE-QUERY"},{"label":"Extended Query","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY"},{"label":"Pipelining","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-PIPELINING"},{"label":"Function Call","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-FUNCTION-CALL"},{"label":"COPY Operations","url":"/docs/18/protocol-flow.html#PROTOCOL-COPY"},{"label":"Asynchronous Operations","url":"/docs/18/protocol-flow.html#PROTOCOL-ASYNC"}],"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":"ReadyForQuery (B)","sources":[{"label":"PostgreSQL 18 English manual","path":"protocol-message-formats.html","sha256":"53f37652ac2c089e30ada87d8aee7bdd0f26695b03f275302e526a807d2a1f23","url":"/docs/18/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-READYFORQUERY"}],"tables":[{"columns":[{"key":"c0","label":"Position"},{"key":"c1","label":"Format"},{"key":"c2","label":"Meaning"}],"key":"fields","rows":[{"c0":"1","c1":"Byte1('Z')","c2":"Identifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle."},{"c0":"2","c1":"Int32(5)","c2":"Length of message contents in bytes, including self."},{"c0":"3","c1":"Byte1","c2":"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)."}],"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('Z')","c2":"标识消息类型。ReadyForQuery在后端准备好进行新的查询周期时发送。"},{"c0":"2","c1":"Int32(5)","c2":"消息内容的长度（以字节为单位），包括其自身。"},{"c0":"3","c1":"Byte1","c2":"当前后端事务状态指示器。可能的值为' I '，如果空闲（不在事务块中）；' T '，如果在事务块中；或' E '，如果在失败的事务块中（查询将被拒绝，直到块结束）。"}],"title":"按手册顺序排列的线上协议字段"}],"zh_from":{"authored_translation":"source-derived-identity","body_sha256":"6fea505099b32b2830f4062163f95a674fe2a8f5026ff557f968e886610c5851","kind":"same-version-chinese-manual-with-source-derived-identity","manual":{"anchor":"PROTOCOL-MESSAGE-FORMATS-READYFORQUERY","build_id":107,"extraction":"exact-definition","fragment_sha256":"ec87f560303e2e44c90e5996aa3dd4942e967b27c890db23cad27a5fbdb9b5c4","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-READYFORQUERY","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-READYFORQUERY"}]},"MeasuredEvidence":{}},"Text":{"Collection":"protocol","Key":"readyforquery-b","SourceDatabase":"center","Version":"18","Locale":"en","Title":"ReadyForQuery","Summary":"ReadyForQuery is a backend protocol message. Identifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle.","BodyHTML":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003cspan\u003eByte1(\u0026#39;Z\u0026#39;)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eInt32(5)\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\u003eByte1\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eCurrent backend transaction status indicator. Possible values are \u0026#39;\u003ccode\u003eI\u003c/code\u003e\u0026#39; if idle (not in a transaction block); \u0026#39;\u003ccode\u003eT\u003c/code\u003e\u0026#39; if in a transaction block; or \u0026#39;\u003ccode\u003eE\u003c/code\u003e\u0026#39; if in a failed transaction block (queries will be rejected until block is ended).\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":"38ae8def636e6920505aa18f18c1a879421036606dd2d911438dad6c46aa11d1","Payload":{"description":["ReadyForQuery is a backend protocol message. Identifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle."],"manual_html":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('Z')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32(5)\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\"\u003eByte1\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eCurrent backend transaction status indicator. Possible values are '\u003ccode class=\"literal\"\u003eI\u003c/code\u003e' if idle (not in a transaction block); '\u003ccode class=\"literal\"\u003eT\u003c/code\u003e' if in a transaction block; or '\u003ccode class=\"literal\"\u003eE\u003c/code\u003e' if in a failed transaction block (queries will be rejected until block is ended).\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":"Start-up","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-START-UP"},{"label":"Simple Query","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-SIMPLE-QUERY"},{"label":"Extended Query","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY"},{"label":"Pipelining","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-PIPELINING"},{"label":"Function Call","url":"/docs/18/protocol-flow.html#PROTOCOL-FLOW-FUNCTION-CALL"},{"label":"COPY Operations","url":"/docs/18/protocol-flow.html#PROTOCOL-COPY"},{"label":"Asynchronous Operations","url":"/docs/18/protocol-flow.html#PROTOCOL-ASYNC"}],"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('Z')","c2":"Identifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle."},{"c0":"2","c1":"Int32(5)","c2":"Length of message contents in bytes, including self."},{"c0":"3","c1":"Byte1","c2":"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)."}],"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}
