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

Function pqResultStrdup

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

* pqResultStrdup - * Like strdup, but the space is subsidiary PGresult space. */

Source from the content-addressed store, hash-verified

672 * Like strdup, but the space is subsidiary PGresult space.
673 */
674char *
675pqResultStrdup(PGresult *res, const char *str)
676{
677 char *space = (char *) pqResultAlloc(res, strlen(str) + 1, false);
678
679 if (space)
680 strcpy(space, str);
681 return space;
682}
683
684/*
685 * pqSetResultError -

Callers 4

getRowDescriptionsFunction · 0.85
pqGetErrorNotice3Function · 0.85
PQsetResultAttrsFunction · 0.85
pqSetResultErrorFunction · 0.85

Calls 1

pqResultAllocFunction · 0.85

Tested by

no test coverage detected