{"Entry":{"collection":"psql","key":"cmd-73-74-61-72-74-70-69-70-65-6c-69-6e-65","name":"\\startpipeline","aliases":["\\startpipeline"],"metadata":{"aliases":["\\startpipeline"],"category":"Query execution","content_hash":"9349f9af20f9ff0c833d40f3531991dbcf29a62f1c3e370d2d53a6896c061218","imported_at":"2026-09-30T00:40:45.196578+08:00","name":"\\startpipeline","name_zh":"","slug":"cmd-73-74-61-72-74-70-69-70-65-6c-69-6e-65","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-73-74-61-72-74-70-69-70-65-6c-69-6e-65","SourceDatabase":"center","Version":"18","SourceTable":"psql_command","SourceKey":"cmd-73-74-61-72-74-70-69-70-65-6c-69-6e-65","SourceRevision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","Facts":{"command":"\\startpipeline","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."],"facts":[{"label":"Client","value":"psql 18.6"},{"label":"Case-sensitive spelling","value":"\\startpipeline"}],"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\n\u003cp\u003eThis group of commands implements pipelining of SQL statements. A pipeline must begin with a \u003ccode class=\"command\"\u003e\\startpipeline\u003c/code\u003e and end with an \u003ccode class=\"command\"\u003e\\endpipeline\u003c/code\u003e. In between there may be any number of \u003ccode class=\"command\"\u003e\\syncpipeline\u003c/code\u003e commands, 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 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 \u003ca class=\"xref\" href=\"/docs/18/libpq-pipeline-mode.html\" title=\"32.5. Pipeline Mode\"\u003eSection 32.5\u003c/a\u003e for more details.\u003c/p\u003e\n\u003cp\u003eAll 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 \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 or \u003ccode class=\"literal\"\u003e\\parse\u003c/code\u003e can be used in an ongoing pipeline. While a pipeline is ongoing, \u003ccode class=\"literal\"\u003e\\sendpipeline\u003c/code\u003e will append the current query buffer to the pipeline. Other meta-commands like \u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e, \u003ccode class=\"literal\"\u003e\\gx\u003c/code\u003e or \u003ccode class=\"literal\"\u003e\\gdesc\u003c/code\u003e are not allowed in pipeline mode.\u003c/p\u003e\n\u003cp\u003e\u003ccode class=\"command\"\u003e\\flushrequest\u003c/code\u003e appends a flush command to the pipeline, allowing to read results with \u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e without issuing a sync or ending the pipeline. \u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e will automatically push unsent data to the server. \u003ccode class=\"command\"\u003e\\flush\u003c/code\u003e can be used to manually push unsent data.\u003c/p\u003e\n\u003cp\u003e\u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e accepts an optional \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e parameter. If provided, only the first \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e pending results will be read. If not provided or \u003ccode class=\"literal\"\u003e0\u003c/code\u003e, all pending results are read.\u003c/p\u003e\n\u003cp\u003eWhen pipeline mode is active, a dedicated prompt variable is available to report the pipeline status. 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\u003c/p\u003e\n\u003cp\u003e\u003ccode class=\"command\"\u003eCOPY\u003c/code\u003e is not supported while in pipeline mode.\u003c/p\u003e\n\u003cp\u003eExample:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003e\\startpipeline\nSELECT * FROM pg_class;\nSELECT 1 \\bind \\sendpipeline\n\\flushrequest\n\\getresults\n\\endpipeline\n\u003c/pre\u003e\n\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","manual_path":"app-psql.html#APP-PSQL-META-COMMAND-PIPELINE","modifiers":[],"related":[{"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":"\\getresults","url":"/wiki/psql/cmd-67-65-74-72-65-73-75-6c-74-73/?v=18"},{"label":"psql command-line options and complete manual","url":"/wiki/tool/psql/?v=18"}],"release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.6","major":"18","manifest":{"index":"index.html","major":"18","pages":1148,"pdf":{"A4":{"built_at":"2026-09-26","bytes":15865106,"pages":3154,"sha256":"19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190","url":"/files/documentation/pdf/18/postgresql-18-A4.pdf"},"US":{"built_at":"2026-09-26","bytes":15748059,"pages":3328,"sha256":"facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319","url":"/files/documentation/pdf/18/postgresql-18-US.pdf"}},"release":"18.6","source_mode":"en SGML built with pinned official archive","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","svg_assets":3,"tree":"18"},"ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sections":[],"signature":"\\startpipeline \\sendpipeline \\syncpipeline \\endpipeline \\flushrequest \\flush \\getresults [ number_results ]","sources":[{"anchor":"APP-PSQL-META-COMMAND-PIPELINE","file":"app-psql.html","label":"18.6 English manual · app-psql.html","sha256":"fa2a1d39294b8854318e82e93f71272c645ed88150ecc2786c28902c3f32782c","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"}]},"ManualEvidence":{"manual_path":"app-psql.html#APP-PSQL-META-COMMAND-PIPELINE","release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.6","major":"18","manifest":{"index":"index.html","major":"18","pages":1148,"pdf":{"A4":{"built_at":"2026-09-26","bytes":15865106,"pages":3154,"sha256":"19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190","url":"/files/documentation/pdf/18/postgresql-18-A4.pdf"},"US":{"built_at":"2026-09-26","bytes":15748059,"pages":3328,"sha256":"facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319","url":"/files/documentation/pdf/18/postgresql-18-US.pdf"}},"release":"18.6","source_mode":"en SGML built with pinned official archive","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","svg_assets":3,"tree":"18"},"ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sources":[{"anchor":"APP-PSQL-META-COMMAND-PIPELINE","file":"app-psql.html","label":"18.6 English manual · app-psql.html","sha256":"fa2a1d39294b8854318e82e93f71272c645ed88150ecc2786c28902c3f32782c","url":"/docs/18/app-psql.html#APP-PSQL-META-COMMAND-PIPELINE"}]},"MeasuredEvidence":{}},"Text":{"Collection":"psql","Key":"cmd-73-74-61-72-74-70-69-70-65-6c-69-6e-65","SourceDatabase":"center","Version":"18","Locale":"en","Title":"\\startpipeline","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\n\u003cp\u003eThis group of commands implements pipelining of SQL statements. A pipeline must begin with a \u003ccode\u003e\\startpipeline\u003c/code\u003e and end with an \u003ccode\u003e\\endpipeline\u003c/code\u003e. In between there may be any number of \u003ccode\u003e\\syncpipeline\u003c/code\u003e commands, which sends a \u003ca href=\"/docs/18/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY\" rel=\"nofollow\"\u003esync message\u003c/a\u003e 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 \u003ca href=\"/docs/18/libpq-pipeline-mode.html\" rel=\"nofollow\"\u003eSection 32.5\u003c/a\u003e for more details.\u003c/p\u003e\n\u003cp\u003eAll 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 \u003ccode\u003e\\bind\u003c/code\u003e, \u003ccode\u003e\\bind_named\u003c/code\u003e, \u003ccode\u003e\\close_prepared\u003c/code\u003e or \u003ccode\u003e\\parse\u003c/code\u003e can be used in an ongoing pipeline. While a pipeline is ongoing, \u003ccode\u003e\\sendpipeline\u003c/code\u003e will append the current query buffer to the pipeline. Other meta-commands like \u003ccode\u003e\\g\u003c/code\u003e, \u003ccode\u003e\\gx\u003c/code\u003e or \u003ccode\u003e\\gdesc\u003c/code\u003e are not allowed in pipeline mode.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003e\\flushrequest\u003c/code\u003e appends a flush command to the pipeline, allowing to read results with \u003ccode\u003e\\getresults\u003c/code\u003e without issuing a sync or ending the pipeline. \u003ccode\u003e\\getresults\u003c/code\u003e will automatically push unsent data to the server. \u003ccode\u003e\\flush\u003c/code\u003e can be used to manually push unsent data.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003e\\getresults\u003c/code\u003e accepts an optional \u003cem\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e parameter. If provided, only the first \u003cem\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e pending results will be read. If not provided or \u003ccode\u003e0\u003c/code\u003e, all pending results are read.\u003c/p\u003e\n\u003cp\u003eWhen pipeline mode is active, a dedicated prompt variable is available to report the pipeline status. 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\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eCOPY\u003c/code\u003e is not supported while in pipeline mode.\u003c/p\u003e\n\u003cp\u003eExample:\u003c/p\u003e\n\u003cpre\u003e\\startpipeline\nSELECT * FROM pg_class;\nSELECT 1 \\bind \\sendpipeline\n\\flushrequest\n\\getresults\n\\endpipeline\n\u003c/pre\u003e\n\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","SourceRevision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","ContentHash":"51b8e1fcd2e0f68f26451dafdc0a3aab78e565d91022ff8fd7fb57e4a3d806f0","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\n\u003cp\u003eThis group of commands implements pipelining of SQL statements. A pipeline must begin with a \u003ccode class=\"command\"\u003e\\startpipeline\u003c/code\u003e and end with an \u003ccode class=\"command\"\u003e\\endpipeline\u003c/code\u003e. In between there may be any number of \u003ccode class=\"command\"\u003e\\syncpipeline\u003c/code\u003e commands, 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 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 \u003ca class=\"xref\" href=\"/docs/18/libpq-pipeline-mode.html\" title=\"32.5. Pipeline Mode\"\u003eSection 32.5\u003c/a\u003e for more details.\u003c/p\u003e\n\u003cp\u003eAll 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 \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 or \u003ccode class=\"literal\"\u003e\\parse\u003c/code\u003e can be used in an ongoing pipeline. While a pipeline is ongoing, \u003ccode class=\"literal\"\u003e\\sendpipeline\u003c/code\u003e will append the current query buffer to the pipeline. Other meta-commands like \u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e, \u003ccode class=\"literal\"\u003e\\gx\u003c/code\u003e or \u003ccode class=\"literal\"\u003e\\gdesc\u003c/code\u003e are not allowed in pipeline mode.\u003c/p\u003e\n\u003cp\u003e\u003ccode class=\"command\"\u003e\\flushrequest\u003c/code\u003e appends a flush command to the pipeline, allowing to read results with \u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e without issuing a sync or ending the pipeline. \u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e will automatically push unsent data to the server. \u003ccode class=\"command\"\u003e\\flush\u003c/code\u003e can be used to manually push unsent data.\u003c/p\u003e\n\u003cp\u003e\u003ccode class=\"command\"\u003e\\getresults\u003c/code\u003e accepts an optional \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e parameter. If provided, only the first \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumber_results\u003c/code\u003e\u003c/em\u003e pending results will be read. If not provided or \u003ccode class=\"literal\"\u003e0\u003c/code\u003e, all pending results are read.\u003c/p\u003e\n\u003cp\u003eWhen pipeline mode is active, a dedicated prompt variable is available to report the pipeline status. 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\u003c/p\u003e\n\u003cp\u003e\u003ccode class=\"command\"\u003eCOPY\u003c/code\u003e is not supported while in pipeline mode.\u003c/p\u003e\n\u003cp\u003eExample:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003e\\startpipeline\nSELECT * FROM pg_class;\nSELECT 1 \\bind \\sendpipeline\n\\flushrequest\n\\getresults\n\\endpipeline\n\u003c/pre\u003e\n\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","related":[{"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":"\\getresults","url":"/wiki/psql/cmd-67-65-74-72-65-73-75-6c-74-73/?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":"zh-Hans","Fallback":true,"Versions":["18","19","20"],"Locales":["en"],"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}
