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

Function pqSaveMessageField

src/interfaces/libpq/fe-exec.c:995–1011  ·  view source on GitHub ↗

* pqSaveMessageField - save one field of an error or notice message */

Source from the content-addressed store, hash-verified

993 * pqSaveMessageField - save one field of an error or notice message
994 */
995void
996pqSaveMessageField(PGresult *res, char code, const char *value)
997{
998 PGMessageField *pfield;
999
1000 pfield = (PGMessageField *)
1001 pqResultAlloc(res,
1002 offsetof(PGMessageField, contents) +
1003 strlen(value) + 1,
1004 true);
1005 if (!pfield)
1006 return; /* out of memory? */
1007 pfield->code = code;
1008 strcpy(pfield->contents, value);
1009 pfield->next = res->errFields;
1010 res->errFields = pfield;
1011}
1012
1013/*
1014 * pqSaveParameterStatus - remember parameter status sent by backend

Callers 4

cdbdisp_appendResultFunction · 0.85
pqGetErrorNotice3Function · 0.85
pqInternalNoticeFunction · 0.85
print_log_handlerFunction · 0.85

Calls 1

pqResultAllocFunction · 0.85

Tested by

no test coverage detected