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

Function getParameterStatus

src/interfaces/libpq/fe-protocol3.c:1581–1600  ·  view source on GitHub ↗

* Attempt to read a ParameterStatus message. * This is possible in several places, so we break it out as a subroutine. * Entry: 'S' message type and length have already been consumed. * Exit: returns 0 if successfully consumed message. * returns EOF if not enough data. */

Source from the content-addressed store, hash-verified

1579 * returns EOF if not enough data.
1580 */
1581static int
1582getParameterStatus(PGconn *conn)
1583{
1584 PQExpBufferData valueBuf;
1585
1586 /* Get the parameter name */
1587 if (pqGets(&conn->workBuffer, conn))
1588 return EOF;
1589 /* Get the parameter value (could be large) */
1590 initPQExpBuffer(&valueBuf);
1591 if (pqGets(&valueBuf, conn))
1592 {
1593 termPQExpBuffer(&valueBuf);
1594 return EOF;
1595 }
1596 /* And save it */
1597 pqSaveParameterStatus(conn, conn->workBuffer.data, valueBuf.data);
1598 termPQExpBuffer(&valueBuf);
1599 return 0;
1600}
1601
1602
1603/*

Callers 4

ifFunction · 0.85
pqParseInput3Function · 0.85
getCopyDataMessageFunction · 0.85
pqFunctionCall3Function · 0.85

Calls 4

pqGetsFunction · 0.85
initPQExpBufferFunction · 0.85
termPQExpBufferFunction · 0.85
pqSaveParameterStatusFunction · 0.85

Tested by

no test coverage detected