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

Function PQoidValue

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

* PQoidValue - * a perhaps preferable form of the above which just returns * an Oid type */

Source from the content-addressed store, hash-verified

3596 * an Oid type
3597 */
3598Oid
3599PQoidValue(const PGresult *res)
3600{
3601 char *endptr = NULL;
3602 unsigned long result;
3603
3604 if (!res ||
3605 strncmp(res->cmdStatus, "INSERT ", 7) != 0 ||
3606 res->cmdStatus[7] < '0' ||
3607 res->cmdStatus[7] > '9')
3608 return InvalidOid;
3609
3610 result = strtoul(res->cmdStatus + 7, &endptr, 10);
3611
3612 if (!endptr || (*endptr != ' ' && *endptr != '\0'))
3613 return InvalidOid;
3614 else
3615 return (Oid) result;
3616}
3617
3618
3619/*

Callers 2

ecpg_process_outputFunction · 0.85
PrintQueryStatusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected