MCPcopy Create free account
hub / github.com/apache/cloudberry / pqPutMsgEndNoAutoFlush

Function pqPutMsgEndNoAutoFlush

src/interfaces/libpq/fe-misc.c:553–577  ·  view source on GitHub ↗

* Same as pqPutMsgEnd except that data is NEVER flushed. */

Source from the content-addressed store, hash-verified

551 * Same as pqPutMsgEnd except that data is NEVER flushed.
552 */
553void
554pqPutMsgEndNoAutoFlush(PGconn *conn)
555{
556 /* Fill in length word if needed */
557 if (conn->outMsgStart >= 0)
558 {
559 uint32 msgLen = conn->outMsgEnd - conn->outMsgStart;
560
561 msgLen = pg_hton32(msgLen);
562 memcpy(conn->outBuffer + conn->outMsgStart, &msgLen, 4);
563 }
564
565 /* trace client-to-server message */
566 if (conn->Pfdebug)
567 {
568 if (conn->outCount < conn->outMsgStart)
569 pqTraceOutputMessage(conn, conn->outBuffer + conn->outCount, true);
570 else
571 pqTraceOutputNoTypeByteMessage(conn,
572 conn->outBuffer + conn->outMsgStart);
573 }
574
575 /* Make message eligible to send */
576 conn->outCount = conn->outMsgEnd;
577}
578
579/*
580 * pqPutMsgEnd: finish constructing a message and possibly send it

Callers 1

pqPutMsgEndFunction · 0.85

Calls 2

pqTraceOutputMessageFunction · 0.85

Tested by

no test coverage detected