@@ -3547,8 +3547,9 @@ ExecStatusType PQresultStatus(const PGresult *res);
3547
3547
<listitem>
3548
3548
<para>
3549
3549
The <structname>PGresult</structname> represents a
3550
- synchronization point in pipeline mode, requested by
3551
- <xref linkend="libpq-PQpipelineSync"/>.
3550
+ synchronization point in pipeline mode, requested by either
3551
+ <xref linkend="libpq-PQpipelineSync"/> or
3552
+ <xref linkend="libpq-PQsendPipelineSync"/>.
3552
3553
This status occurs only when pipeline mode has been selected.
3553
3554
</para>
3554
3555
</listitem>
@@ -5122,7 +5123,8 @@ int PQsendClosePortal(PGconn *conn, const char *portalName);
5122
5123
<xref linkend="libpq-PQsendDescribePrepared"/>,
5123
5124
<xref linkend="libpq-PQsendDescribePortal"/>,
5124
5125
<xref linkend="libpq-PQsendClosePrepared"/>,
5125
- <xref linkend="libpq-PQsendClosePortal"/>, or
5126
+ <xref linkend="libpq-PQsendClosePortal"/>,
5127
+ <xref linkend="libpq-PQsendPipelineSync"/>, or
5126
5128
<xref linkend="libpq-PQpipelineSync"/>
5127
5129
call, and returns it.
5128
5130
A null pointer is returned when the command is complete and there
@@ -5507,8 +5509,9 @@ int PQflush(PGconn *conn);
5507
5509
client sends them. The server will begin executing the commands in the
5508
5510
pipeline immediately, not waiting for the end of the pipeline.
5509
5511
Note that results are buffered on the server side; the server flushes
5510
- that buffer when a synchronization point is established with
5511
- <function>PQpipelineSync</function>, or when
5512
+ that buffer when a synchronization point is established with either
5513
+ <function>PQpipelineSync</function> or
5514
+ <function>PQsendPipelineSync</function>, or when
5512
5515
<function>PQsendFlushRequest</function> is called.
5513
5516
If any statement encounters an error, the server aborts the current
5514
5517
transaction and does not execute any subsequent command in the queue
@@ -5565,7 +5568,8 @@ int PQflush(PGconn *conn);
5565
5568
<type>PGresult</type> types <literal>PGRES_PIPELINE_SYNC</literal>
5566
5569
and <literal>PGRES_PIPELINE_ABORTED</literal>.
5567
5570
<literal>PGRES_PIPELINE_SYNC</literal> is reported exactly once for each
5568
- <function>PQpipelineSync</function> at the corresponding point
5571
+ <function>PQpipelineSync</function> or
5572
+ <function>PQsendPipelineSync</function> at the corresponding point
5569
5573
in the pipeline.
5570
5574
<literal>PGRES_PIPELINE_ABORTED</literal> is emitted in place of a normal
5571
5575
query result for the first error and all subsequent results
@@ -5603,7 +5607,8 @@ int PQflush(PGconn *conn);
5603
5607
<function>PQresultStatus</function> will report a
5604
5608
<literal>PGRES_PIPELINE_ABORTED</literal> result for each remaining queued
5605
5609
operation in an aborted pipeline. The result for
5606
- <function>PQpipelineSync</function> is reported as
5610
+ <function>PQpipelineSync</function> or
5611
+ <function>PQsendPipelineSync</function> is reported as
5607
5612
<literal>PGRES_PIPELINE_SYNC</literal> to signal the end of the aborted pipeline
5608
5613
and resumption of normal result processing.
5609
5614
</para>
@@ -5810,6 +5815,32 @@ int PQpipelineSync(PGconn *conn);
5810
5815
</listitem>
5811
5816
</varlistentry>
5812
5817
5818
+ <varlistentry id="libpq-PQsendPipelineSync">
5819
+ <term><function>PQsendPipelineSync</function><indexterm><primary>PQsendPipelineSync</primary></indexterm></term>
5820
+
5821
+ <listitem>
5822
+ <para>
5823
+ Marks a synchronization point in a pipeline by sending a
5824
+ <link linkend="protocol-flow-ext-query">sync message</link>
5825
+ without flushing the send buffer. This serves as
5826
+ the delimiter of an implicit transaction and an error recovery
5827
+ point; see <xref linkend="libpq-pipeline-errors"/>.
5828
+
5829
+ <synopsis>
5830
+ int PQsendPipelineSync(PGconn *conn);
5831
+ </synopsis>
5832
+ </para>
5833
+ <para>
5834
+ Returns 1 for success. Returns 0 if the connection is not in
5835
+ pipeline mode or sending a
5836
+ <link linkend="protocol-flow-ext-query">sync message</link>
5837
+ failed.
5838
+ Note that the message is not itself flushed to the server automatically;
5839
+ use <function>PQflush</function> if necessary.
5840
+ </para>
5841
+ </listitem>
5842
+ </varlistentry>
5843
+
5813
5844
<varlistentry id="libpq-PQsendFlushRequest">
5814
5845
<term><function>PQsendFlushRequest</function><indexterm><primary>PQsendFlushRequest</primary></indexterm></term>
5815
5846
0 commit comments