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

Function pqFlush

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

* pqFlush: send any data waiting in the output buffer * * Return 0 on success, -1 on failure and 1 when not all data could be sent * because the socket would block and the connection is non-blocking. * (See pqSendSome comments about how failure should be handled.) */

Source from the content-addressed store, hash-verified

1024 * (See pqSendSome comments about how failure should be handled.)
1025 */
1026int
1027pqFlush(PGconn *conn)
1028{
1029 if (conn->outCount > 0)
1030 {
1031 if (conn->Pfdebug)
1032 fflush(conn->Pfdebug);
1033
1034 return pqSendSome(conn, conn->outCount);
1035 }
1036
1037 return 0;
1038}
1039
1040/*
1041 * pqFlushNonBlocking:

Callers 15

checkDispatchResultFunction · 0.85
send_sequence_responseFunction · 0.85
PQsendGpQuery_sharedFunction · 0.85
pg_SASL_initFunction · 0.85
PQconnectPollFunction · 0.85
sendTerminateConnFunction · 0.85
pqPacketSendFunction · 0.85
pqFlushNonBlockingFunction · 0.85
pqEndcopy3Function · 0.85
pqFunctionCall3Function · 0.85
PQconsumeInputFunction · 0.85
PQgetResultFunction · 0.85

Calls 1

pqSendSomeFunction · 0.85

Tested by

no test coverage detected