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

Function nodeToBinaryStringFast

src/backend/nodes/outfast.c:1951–1967  ·  view source on GitHub ↗

* nodeToBinaryStringFast - * returns a binary representation of the Node as a palloc'd string */

Source from the content-addressed store, hash-verified

1949 * returns a binary representation of the Node as a palloc'd string
1950 */
1951char *
1952nodeToBinaryStringFast(void *obj, int *length)
1953{
1954 StringInfoData str;
1955 int16 tg = (int16) 0xDEAD;
1956
1957 /* see stringinfo.h for an explanation of this maneuver */
1958 initStringInfoOfSize(&str, 4096);
1959
1960 _outNode(&str, obj);
1961
1962 /* Add something special at the end that we can check in readfast.c */
1963 appendBinaryStringInfo(&str, (const char *)&tg, sizeof(int16));
1964
1965 *length = str.len;
1966 return str.data;
1967}

Callers 1

serializeNodeFunction · 0.85

Calls 3

initStringInfoOfSizeFunction · 0.85
_outNodeFunction · 0.85
appendBinaryStringInfoFunction · 0.85

Tested by

no test coverage detected