{"Entry":{"collection":"psql","key":"cmd-67-65-74-72-65-73-75-6c-74-73","name":"\\getresults","aliases":["\\getresults"],"metadata":{"aliases":["\\getresults"],"category":"Query execution","content_hash":"84c318a3ded94aa85bc34b172d4629b131302f35b5bbdaae34f5f1c68d89b322","derived_content_hash":"25026e08454f14866f463bc589be8d905037de5745a9f44d08dbb2be2f89bc47","documentation_refresh":{"batch":"20261113","original_source_rev":"","versions":{"18":"18.7","19":"19rc2"}},"imported_at":"2026-09-30T00:40:45.034141+08:00","name":"\\getresults","name_zh":"","slug":"cmd-67-65-74-72-65-73-75-6c-74-73","summary":"This group of commands implements pipelining of SQL statements. A pipeline must begin with a \\startpipeline and end with an \\endpipeline . In between there may be any number of \\syncpipeline commands, which sends a sync message without ending the ongoing pipeline and flushing the send buffer. In pipeline mode, statements are sent to the server without waiting for the results of previous statements. See Section 32.5 for more details."}},"Definition":{"Collection":"psql","Key":"cmd-67-65-74-72-65-73-75-6c-74-73","SourceDatabase":"center","Version":"18","SourceTable":"psql_command","SourceKey":"cmd-67-65-74-72-65-73-75-6c-74-73","SourceRevision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","Facts":{"command":"\\getresults","comparison_data":{"definition":"This group of commands implements pipelining of SQL statements. A pipeline must begin with a \\startpipeline and end with an \\endpipeline . In between there may be any number of \\syncpipeline commands, which sends a sync message without ending the ongoing pipeline and flushing the send buffer. In pipeline mode, statements are sent to the server without waiting for the results of previous statements. See Section 32.5 for more details. All queries executed while a pipeline is ongoing use the extended query protocol. Queries are appended to the pipeline when ending with a semicolon. The meta-commands \\bind , \\bind_named , \\close_prepared or \\parse can be used in an ongoing pipeline. While a pipeline is ongoing, \\sendpipeline will append the current query buffer to the pipeline. Other meta-commands like \\g , \\gx or \\gdesc are not allowed in pipeline mode. \\flushrequest appends a flush command to the pipeline, allowing to read results with \\getresults without issuing a sync or ending the pipeline. \\getresults will automatically push unsent data to the server. \\flush can be used to manually push unsent data. \\getresults accepts an optional number_results parameter. If provided, only the first number_results pending results will be read. If not provided or 0 , all pending results are read. When pipeline mode is active, a dedicated prompt variable is available to report the pipeline status. See %P for more details COPY is not supported while in pipeline mode. Example: \\startpipeline SELECT * FROM pg_class; SELECT 1 \\bind \\sendpipeline \\flushrequest \\getresults \\endpipeline","modifiers":[],"signature":"\\startpipeline \\sendpipeline \\syncpipeline \\endpipeline \\flushrequest \\flush \\getresults [ number_results ]","spellings":["\\startpipeline","\\sendpipeline","\\syncpipeline","\\endpipeline","\\flushrequest","\\flush","\\getresults"]},"comparison_hash":"040a9956ba3780370b72d9837a83079a03b641afd0cd9f7e39a7b0c0dc62127e","description":["This group of commands implements pipelining of SQL statements. A pipeline must begin with a \\startpipeline and end with an \\endpipeline . In between there may be any number of \\syncpipeline commands, which sends a sync message without ending the ongoing pipeline and flushing the send buffer. In pipeline mode, statements are sent to the server without waiting for the results of previous statements. See Section 32.5 for more details."],"description_zh":"这组命令实现 SQL 语句的管道化。一个管道必须以 \\startpipeline 开始，并以 \\endpipeline 结束。其间可以出现任意数量的 \\syncpipeline 命令，它会发送一条 同步消息 ，而不会结束当前管道，也不会刷新发送缓冲区。在管道模式下，语句会被发送到服务器，而不等待前面语句的结果。更多细节见 第 32.5 节 。","description_zh_html":"\u003cdd\u003e\u003cp\u003e\n        这组命令实现 SQL 语句的管道化。一个管道必须以 \u003ccode class=\"command\"\u003e\\startpipeline\u003c/code\u003e 开始，并以 \u003ccode class=\"command\"\u003e\\endpipeline\u003c/code\u003e 结束。其间可以出现任意数量的 \u003ccode class=\"command\"\u003e\\syncpipeline\u003c/code\u003e 命令，它会发送一条\u003ca class=\"link\" href=\"/zh/docs/18/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY\" title=\"54.2.3. 扩展查询\"\u003e同步消息\u003c/a\u003e，而不会结束当前管道，也不会刷新发送缓冲区。在管道模式下，语句会被发送到服务器，而不等待前面语句的结果。更多细节见\u003ca class=\"xref\" href=\"/zh/docs/18/libpq-pipeline-mode.html\" title=\"32.5. 管道模式\"\u003e第 32.5 节\u003c/a\u003e。\n       \u003c/p\u003e\u003cp\u003e\n        管道进行期间执行的所有查询都使用扩展查询协议。以分号结束的查询会被追加到管道中。元命令 \u003ccode class=\"literal\"\u003e\\bind\u003c/code\u003e、\u003ccode class=\"literal\"\u003e\\bind_named\u003c/code\u003e、\u003ccode class=\"literal\"\u003e\\close_prepared\u003c/code\u003e 和\n        \u003ccode class=\"literal\"\u003e\\parse\u003c/code\u003e 可以在进行中的管道里使用。管道进行期间，\u003ccode class=\"literal\"\u003e\\sendpipeline\u003c/code\u003e 会将当前查询缓冲区追加到管道中。其他元命令，如\n        \u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e、\u003ccode class=\"literal\"\u003e\\gx\u003c/code\u003e 或\n        \u003ccode class=\"literal\"\u003e\\gdesc\u003c/code\u003e，则不允许在管道模式中使用。\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003e\\flushrequest\u003c/code\u003e 会向管道追加一条 flush 命令，使得可以在不发送 sync 或结束管道的情况下通过\n        \u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e 读取结果。\u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e 会自动将尚未发送的数据推送到服务器。\u003ccode class=\"command\"\u003e\\flush\u003c/code\u003e 可用于手动推送未发送的数据。\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e 接受一个可选的\n        \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e 参数。如果提供，则只读取前\n        \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e 个待处理结果。若省略该参数或其值为 \u003ccode class=\"literal\"\u003e0\u003c/code\u003e，则读取所有待处理结果。\n       \u003c/p\u003e\u003cp\u003e\n        当管道模式处于活动状态时，可使用一个专用的提示符变量来报告管道状态。详见 \u003ca class=\"xref\" href=\"/zh/docs/18/app-psql.html#APP-PSQL-PROMPTING-P-UC\"\u003e\u003ccode class=\"literal\"\u003e%P\u003c/code\u003e\u003c/a\u003e。\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003eCOPY\u003c/code\u003e 在管道模式中不支持。\n       \u003c/p\u003e\u003cp\u003e\n        示例：\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\n\\startpipeline\nSELECT * FROM pg_class;\nSELECT 1 \\bind \\sendpipeline\n\\flushrequest\n\\getresults\n\\endpipeline\n\u003c/pre\u003e\u003cp\u003e\n\u003c/p\u003e\u003c/dd\u003e","documentation_revision":{"inputs":[{"file":"app-psql.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"af50448485df02bdef2b72b8347192ba029c7082b8d0392ecb17db44ad533aaf","version":"18.7"},{"file":"app-psql.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"cb475c53a16d9e06358f5e6c9c5649645db92568cfd319f230c62c9f57ae090b","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"facts":[{"label":"Client","value":"psql 18.7"},{"label":"Case-sensitive spelling","value":"\\getresults"}],"facts_zh":[{"label":"客户端","value":"psql 18.7"},{"label":"区分大小写的写法","value":"\\getresults"}],"localization":{"documentation_release":"18.7","language":"en","source_language":"en","source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552","status":"same-version-reviewed-manual"},"manual_html":"\u003cdiv\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt id=\"APP-PSQL-META-COMMAND-PIPELINE\"\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\startpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\sendpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\syncpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\endpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\flushrequest\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\flush\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\getresults [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e ]\u003c/code\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n        This group of commands implements pipelining of SQL statements.\n        A pipeline must begin with a \u003ccode class=\"command\"\u003e\\startpipeline\u003c/code\u003e\n        and end with an \u003ccode class=\"command\"\u003e\\endpipeline\u003c/code\u003e. In between there\n        may be any number of \u003ccode class=\"command\"\u003e\\syncpipeline\u003c/code\u003e commands,\n        which sends a \u003ca class=\"link\" href=\"/docs/18/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY\" title=\"54.2.3. Extended Query\"\u003esync message\u003c/a\u003e\n        without ending the ongoing pipeline and flushing the send buffer.\n        In pipeline mode, statements are sent to the server without waiting\n        for the results of previous statements.\n        See \u003ca class=\"xref\" href=\"/docs/18/libpq-pipeline-mode.html\" title=\"32.5. Pipeline Mode\"\u003eSection 32.5\u003c/a\u003e for more details.\n       \u003c/p\u003e\u003cp\u003e\n        All queries executed while a pipeline is ongoing use the extended\n        query protocol. Queries are appended to the pipeline when ending with\n        a semicolon. The meta-commands \u003ccode class=\"literal\"\u003e\\bind\u003c/code\u003e,\n        \u003ccode class=\"literal\"\u003e\\bind_named\u003c/code\u003e, \u003ccode class=\"literal\"\u003e\\close_prepared\u003c/code\u003e or\n        \u003ccode class=\"literal\"\u003e\\parse\u003c/code\u003e can be used in an ongoing pipeline. While\n        a pipeline is ongoing, \u003ccode class=\"literal\"\u003e\\sendpipeline\u003c/code\u003e will append\n        the current query buffer to the pipeline. Other meta-commands like\n        \u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e, \u003ccode class=\"literal\"\u003e\\gx\u003c/code\u003e or\n        \u003ccode class=\"literal\"\u003e\\gdesc\u003c/code\u003e are not allowed in pipeline mode.\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003e\\flushrequest\u003c/code\u003e appends a flush command to the\n        pipeline, allowing to read results with\n        \u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e without issuing a sync or ending the\n        pipeline. \u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e will automatically push\n        unsent data to the server. \u003ccode class=\"command\"\u003e\\flush\u003c/code\u003e can be used to\n        manually push unsent data.\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e accepts an optional\n        \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e parameter.\n        If provided, only the first\n        \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e pending\n        results will be read. If not provided or \u003ccode class=\"literal\"\u003e0\u003c/code\u003e, all\n        pending results are read.\n       \u003c/p\u003e\u003cp\u003e\n        When pipeline mode is active, a dedicated prompt variable is available\n        to report the pipeline status.\n        See \u003ca class=\"xref\" href=\"/docs/18/app-psql.html#APP-PSQL-PROMPTING-P-UC\"\u003e\u003ccode class=\"literal\"\u003e%P\u003c/code\u003e\u003c/a\u003e for more details\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003eCOPY\u003c/code\u003e is not supported while in pipeline mode.\n       \u003c/p\u003e\u003cp\u003e\n        Example:\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\\startpipeline\nSELECT * FROM pg_class;\nSELECT 1 \\bind \\sendpipeline\n\\flushrequest\n\\getresults\n\\endpipeline\n\u003c/pre\u003e\u003cp\u003e\n\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","manual_path":"app-psql.html#APP-PSQL-META-COMMAND-PIPELINE","modifiers":[],"related":[{"label":"\\startpipeline","url":"/wiki/psql/cmd-73-74-61-72-74-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\sendpipeline","url":"/wiki/psql/cmd-73-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\syncpipeline","url":"/wiki/psql/cmd-73-79-6e-63-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\endpipeline","url":"/wiki/psql/cmd-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\flushrequest","url":"/wiki/psql/cmd-66-6c-75-73-68-72-65-71-75-65-73-74/?v=18"},{"label":"\\flush","url":"/wiki/psql/cmd-66-6c-75-73-68/?v=18"},{"label":"psql command-line options and complete manual","url":"/wiki/tool/psql/?v=18"}],"related_zh":[{"label":"\\startpipeline","url":"/wiki/psql/cmd-73-74-61-72-74-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\sendpipeline","url":"/wiki/psql/cmd-73-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\syncpipeline","url":"/wiki/psql/cmd-73-79-6e-63-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\endpipeline","url":"/wiki/psql/cmd-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\flushrequest","url":"/wiki/psql/cmd-66-6c-75-73-68-72-65-71-75-65-73-74/?v=18"},{"label":"\\flush","url":"/wiki/psql/cmd-66-6c-75-73-68/?v=18"},{"label":"psql 命令行选项及完整手册","url":"/wiki/tool/psql/?v=18"}],"release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.7","major":"18","manifest":{"major":"18","release":"18.7","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd","source_url":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2"},"ref":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2","revision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd"},"sections":[],"sections_zh":[],"signature":"\\startpipeline \\sendpipeline \\syncpipeline \\endpipeline \\flushrequest \\flush \\getresults [ number_results ]","sources":[{"anchor":"APP-PSQL-META-COMMAND-PIPELINE","file":"app-psql.html","label":"18.7 English manual · app-psql.html","sha256":"af50448485df02bdef2b72b8347192ba029c7082b8d0392ecb17db44ad533aaf","url":"/docs/18/app-psql.html#APP-PSQL-META-COMMAND-PIPELINE"}],"spellings":["\\startpipeline","\\sendpipeline","\\syncpipeline","\\endpipeline","\\flushrequest","\\flush","\\getresults"],"tables":[{"columns":[{"key":"command","label":"Command"},{"key":"modifiers","label":"Documented suffix modifiers"}],"key":"spellings","rows":[{"command":{"text":"\\startpipeline","url":"/wiki/psql/cmd-73-74-61-72-74-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\sendpipeline","url":"/wiki/psql/cmd-73-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\syncpipeline","url":"/wiki/psql/cmd-73-79-6e-63-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\endpipeline","url":"/wiki/psql/cmd-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\flushrequest","url":"/wiki/psql/cmd-66-6c-75-73-68-72-65-71-75-65-73-74/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\flush","url":"/wiki/psql/cmd-66-6c-75-73-68/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\getresults","url":"/wiki/psql/cmd-67-65-74-72-65-73-75-6c-74-73/?v=18"},"modifiers":"None listed in this signature"}],"title":"Spellings in this manual definition"}],"tables_zh":[{"columns":[{"key":"command","label":"命令"},{"key":"modifiers","label":"手册中的后缀修饰符"}],"key":"spellings","rows":[{"command":{"text":"\\startpipeline","url":"/wiki/psql/cmd-73-74-61-72-74-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"此语法签名未列出"},{"command":{"text":"\\sendpipeline","url":"/wiki/psql/cmd-73-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"此语法签名未列出"},{"command":{"text":"\\syncpipeline","url":"/wiki/psql/cmd-73-79-6e-63-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"此语法签名未列出"},{"command":{"text":"\\endpipeline","url":"/wiki/psql/cmd-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"此语法签名未列出"},{"command":{"text":"\\flushrequest","url":"/wiki/psql/cmd-66-6c-75-73-68-72-65-71-75-65-73-74/?v=18"},"modifiers":"此语法签名未列出"},{"command":{"text":"\\flush","url":"/wiki/psql/cmd-66-6c-75-73-68/?v=18"},"modifiers":"此语法签名未列出"},{"command":{"text":"\\getresults","url":"/wiki/psql/cmd-67-65-74-72-65-73-75-6c-74-73/?v=18"},"modifiers":"此语法签名未列出"}],"title":"本版手册中的写法"}],"zh_from":"same-version-manual"},"ManualEvidence":{"manual_path":"app-psql.html#APP-PSQL-META-COMMAND-PIPELINE","release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.7","major":"18","manifest":{"major":"18","release":"18.7","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd","source_url":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2"},"ref":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2","revision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd"},"sources":[{"anchor":"APP-PSQL-META-COMMAND-PIPELINE","file":"app-psql.html","label":"18.7 English manual · app-psql.html","sha256":"af50448485df02bdef2b72b8347192ba029c7082b8d0392ecb17db44ad533aaf","url":"/docs/18/app-psql.html#APP-PSQL-META-COMMAND-PIPELINE"}]},"MeasuredEvidence":{}},"Text":{"Collection":"psql","Key":"cmd-67-65-74-72-65-73-75-6c-74-73","SourceDatabase":"center","Version":"18","Locale":"en","Title":"\\getresults","Summary":"This group of commands implements pipelining of SQL statements. A pipeline must begin with a \\startpipeline and end with an \\endpipeline . In between there may be any number of \\syncpipeline commands, which sends a sync message without ending the ongoing pipeline and flushing the send buffer. In pipeline mode, statements are sent to the server without waiting for the results of previous statements. See Section 32.5 for more details.","BodyHTML":"\u003cdiv\u003e\u003cdl\u003e\u003cdt id=\"APP-PSQL-META-COMMAND-PIPELINE\"\u003e\u003cspan\u003e\u003ccode\u003e\\startpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e\\sendpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e\\syncpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e\\endpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e\\flushrequest\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e\\flush\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e\\getresults [ \u003cem\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e ]\u003c/code\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n        This group of commands implements pipelining of SQL statements.\n        A pipeline must begin with a \u003ccode\u003e\\startpipeline\u003c/code\u003e\n        and end with an \u003ccode\u003e\\endpipeline\u003c/code\u003e. In between there\n        may be any number of \u003ccode\u003e\\syncpipeline\u003c/code\u003e commands,\n        which sends a \u003ca href=\"/docs/18/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY\" rel=\"nofollow\"\u003esync message\u003c/a\u003e\n        without ending the ongoing pipeline and flushing the send buffer.\n        In pipeline mode, statements are sent to the server without waiting\n        for the results of previous statements.\n        See \u003ca href=\"/docs/18/libpq-pipeline-mode.html\" rel=\"nofollow\"\u003eSection 32.5\u003c/a\u003e for more details.\n       \u003c/p\u003e\u003cp\u003e\n        All queries executed while a pipeline is ongoing use the extended\n        query protocol. Queries are appended to the pipeline when ending with\n        a semicolon. The meta-commands \u003ccode\u003e\\bind\u003c/code\u003e,\n        \u003ccode\u003e\\bind_named\u003c/code\u003e, \u003ccode\u003e\\close_prepared\u003c/code\u003e or\n        \u003ccode\u003e\\parse\u003c/code\u003e can be used in an ongoing pipeline. While\n        a pipeline is ongoing, \u003ccode\u003e\\sendpipeline\u003c/code\u003e will append\n        the current query buffer to the pipeline. Other meta-commands like\n        \u003ccode\u003e\\g\u003c/code\u003e, \u003ccode\u003e\\gx\u003c/code\u003e or\n        \u003ccode\u003e\\gdesc\u003c/code\u003e are not allowed in pipeline mode.\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode\u003e\\flushrequest\u003c/code\u003e appends a flush command to the\n        pipeline, allowing to read results with\n        \u003ccode\u003e\\getresults\u003c/code\u003e without issuing a sync or ending the\n        pipeline. \u003ccode\u003e\\getresults\u003c/code\u003e will automatically push\n        unsent data to the server. \u003ccode\u003e\\flush\u003c/code\u003e can be used to\n        manually push unsent data.\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode\u003e\\getresults\u003c/code\u003e accepts an optional\n        \u003cem\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e parameter.\n        If provided, only the first\n        \u003cem\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e pending\n        results will be read. If not provided or \u003ccode\u003e0\u003c/code\u003e, all\n        pending results are read.\n       \u003c/p\u003e\u003cp\u003e\n        When pipeline mode is active, a dedicated prompt variable is available\n        to report the pipeline status.\n        See \u003ca href=\"/docs/18/app-psql.html#APP-PSQL-PROMPTING-P-UC\" rel=\"nofollow\"\u003e\u003ccode\u003e%P\u003c/code\u003e\u003c/a\u003e for more details\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode\u003eCOPY\u003c/code\u003e is not supported while in pipeline mode.\n       \u003c/p\u003e\u003cp\u003e\n        Example:\n\u003c/p\u003e\u003cpre\u003e\\startpipeline\nSELECT * FROM pg_class;\nSELECT 1 \\bind \\sendpipeline\n\\flushrequest\n\\getresults\n\\endpipeline\n\u003c/pre\u003e\u003cp\u003e\n\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","SourceRevision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","ContentHash":"1648006df47d7d5843e2d1518ae231acd045f86ac65f0095e3d751f25dd88e57","Payload":{"description":["This group of commands implements pipelining of SQL statements. A pipeline must begin with a \\startpipeline and end with an \\endpipeline . In between there may be any number of \\syncpipeline commands, which sends a sync message without ending the ongoing pipeline and flushing the send buffer. In pipeline mode, statements are sent to the server without waiting for the results of previous statements. See Section 32.5 for more details."],"manual_html":"\u003cdiv\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt id=\"APP-PSQL-META-COMMAND-PIPELINE\"\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\startpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\sendpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\syncpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\endpipeline\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\flushrequest\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\flush\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\getresults [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e ]\u003c/code\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n        This group of commands implements pipelining of SQL statements.\n        A pipeline must begin with a \u003ccode class=\"command\"\u003e\\startpipeline\u003c/code\u003e\n        and end with an \u003ccode class=\"command\"\u003e\\endpipeline\u003c/code\u003e. In between there\n        may be any number of \u003ccode class=\"command\"\u003e\\syncpipeline\u003c/code\u003e commands,\n        which sends a \u003ca class=\"link\" href=\"/docs/18/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY\" title=\"54.2.3. Extended Query\"\u003esync message\u003c/a\u003e\n        without ending the ongoing pipeline and flushing the send buffer.\n        In pipeline mode, statements are sent to the server without waiting\n        for the results of previous statements.\n        See \u003ca class=\"xref\" href=\"/docs/18/libpq-pipeline-mode.html\" title=\"32.5. Pipeline Mode\"\u003eSection 32.5\u003c/a\u003e for more details.\n       \u003c/p\u003e\u003cp\u003e\n        All queries executed while a pipeline is ongoing use the extended\n        query protocol. Queries are appended to the pipeline when ending with\n        a semicolon. The meta-commands \u003ccode class=\"literal\"\u003e\\bind\u003c/code\u003e,\n        \u003ccode class=\"literal\"\u003e\\bind_named\u003c/code\u003e, \u003ccode class=\"literal\"\u003e\\close_prepared\u003c/code\u003e or\n        \u003ccode class=\"literal\"\u003e\\parse\u003c/code\u003e can be used in an ongoing pipeline. While\n        a pipeline is ongoing, \u003ccode class=\"literal\"\u003e\\sendpipeline\u003c/code\u003e will append\n        the current query buffer to the pipeline. Other meta-commands like\n        \u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e, \u003ccode class=\"literal\"\u003e\\gx\u003c/code\u003e or\n        \u003ccode class=\"literal\"\u003e\\gdesc\u003c/code\u003e are not allowed in pipeline mode.\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003e\\flushrequest\u003c/code\u003e appends a flush command to the\n        pipeline, allowing to read results with\n        \u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e without issuing a sync or ending the\n        pipeline. \u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e will automatically push\n        unsent data to the server. \u003ccode class=\"command\"\u003e\\flush\u003c/code\u003e can be used to\n        manually push unsent data.\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e accepts an optional\n        \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e parameter.\n        If provided, only the first\n        \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e pending\n        results will be read. If not provided or \u003ccode class=\"literal\"\u003e0\u003c/code\u003e, all\n        pending results are read.\n       \u003c/p\u003e\u003cp\u003e\n        When pipeline mode is active, a dedicated prompt variable is available\n        to report the pipeline status.\n        See \u003ca class=\"xref\" href=\"/docs/18/app-psql.html#APP-PSQL-PROMPTING-P-UC\"\u003e\u003ccode class=\"literal\"\u003e%P\u003c/code\u003e\u003c/a\u003e for more details\n       \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003eCOPY\u003c/code\u003e is not supported while in pipeline mode.\n       \u003c/p\u003e\u003cp\u003e\n        Example:\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\\startpipeline\nSELECT * FROM pg_class;\nSELECT 1 \\bind \\sendpipeline\n\\flushrequest\n\\getresults\n\\endpipeline\n\u003c/pre\u003e\u003cp\u003e\n\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","related":[{"label":"\\startpipeline","url":"/wiki/psql/cmd-73-74-61-72-74-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\sendpipeline","url":"/wiki/psql/cmd-73-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\syncpipeline","url":"/wiki/psql/cmd-73-79-6e-63-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\endpipeline","url":"/wiki/psql/cmd-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},{"label":"\\flushrequest","url":"/wiki/psql/cmd-66-6c-75-73-68-72-65-71-75-65-73-74/?v=18"},{"label":"\\flush","url":"/wiki/psql/cmd-66-6c-75-73-68/?v=18"},{"label":"psql command-line options and complete manual","url":"/wiki/tool/psql/?v=18"}],"sections":[],"tables":[{"columns":[{"key":"command","label":"Command"},{"key":"modifiers","label":"Documented suffix modifiers"}],"key":"spellings","rows":[{"command":{"text":"\\startpipeline","url":"/wiki/psql/cmd-73-74-61-72-74-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\sendpipeline","url":"/wiki/psql/cmd-73-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\syncpipeline","url":"/wiki/psql/cmd-73-79-6e-63-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\endpipeline","url":"/wiki/psql/cmd-65-6e-64-70-69-70-65-6c-69-6e-65/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\flushrequest","url":"/wiki/psql/cmd-66-6c-75-73-68-72-65-71-75-65-73-74/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\flush","url":"/wiki/psql/cmd-66-6c-75-73-68/?v=18"},"modifiers":"None listed in this signature"},{"command":{"text":"\\getresults","url":"/wiki/psql/cmd-67-65-74-72-65-73-75-6c-74-73/?v=18"},"modifiers":"None listed in this signature"}],"title":"Spellings in this manual definition"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":[{"Version":"18","Ordinal":0,"Command":"\\startpipeline","Signature":"\\startpipeline \\sendpipeline \\syncpipeline \\endpipeline \\flushrequest \\flush \\getresults [ number_results ]","Modifiers":[]},{"Version":"18","Ordinal":1,"Command":"\\sendpipeline","Signature":"\\startpipeline \\sendpipeline \\syncpipeline \\endpipeline \\flushrequest \\flush \\getresults [ number_results ]","Modifiers":[]},{"Version":"18","Ordinal":2,"Command":"\\syncpipeline","Signature":"\\startpipeline \\sendpipeline \\syncpipeline \\endpipeline \\flushrequest \\flush \\getresults [ number_results ]","Modifiers":[]},{"Version":"18","Ordinal":3,"Command":"\\endpipeline","Signature":"\\startpipeline \\sendpipeline \\syncpipeline \\endpipeline \\flushrequest \\flush \\getresults [ number_results ]","Modifiers":[]},{"Version":"18","Ordinal":4,"Command":"\\flushrequest","Signature":"\\startpipeline \\sendpipeline \\syncpipeline \\endpipeline \\flushrequest \\flush \\getresults [ number_results ]","Modifiers":[]},{"Version":"18","Ordinal":5,"Command":"\\flush","Signature":"\\startpipeline \\sendpipeline \\syncpipeline \\endpipeline \\flushrequest \\flush \\getresults [ number_results ]","Modifiers":[]},{"Version":"18","Ordinal":6,"Command":"\\getresults","Signature":"\\startpipeline \\sendpipeline \\syncpipeline \\endpipeline \\flushrequest \\flush \\getresults [ number_results ]","Modifiers":[]}],"SQLState":null,"Evidence":null}
