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

Function pqPutMsgBytes

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

* pqPutMsgBytes: add bytes to a partially-constructed message * * Returns 0 on success, EOF on error */

Source from the content-addressed store, hash-verified

535 * Returns 0 on success, EOF on error
536 */
537static int
538pqPutMsgBytes(const void *buf, size_t len, PGconn *conn)
539{
540 /* make sure there is room for it */
541 if (pqCheckOutBufferSpace(conn->outMsgEnd + len, conn))
542 return EOF;
543 /* okay, save the data */
544 memcpy(conn->outBuffer + conn->outMsgEnd, buf, len);
545 conn->outMsgEnd += len;
546 /* no Pfdebug call here, caller should do it */
547 return 0;
548}
549
550/**
551 * Same as pqPutMsgEnd except that data is NEVER flushed.

Callers 4

pqPutcFunction · 0.85
pqPutsFunction · 0.85
pqPutncharFunction · 0.85
pqPutIntFunction · 0.85

Calls 1

pqCheckOutBufferSpaceFunction · 0.85

Tested by

no test coverage detected