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

Function check_tuple_field_number

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

Source from the content-addressed store, hash-verified

3328}
3329
3330static int
3331check_tuple_field_number(const PGresult *res,
3332 int tup_num, int field_num)
3333{
3334 if (!res)
3335 return false; /* no way to display error message... */
3336 if (tup_num < 0 || tup_num >= res->ntups)
3337 {
3338 pqInternalNotice(&res->noticeHooks,
3339 "row number %d is out of range 0..%d",
3340 tup_num, res->ntups - 1);
3341 return false;
3342 }
3343 if (field_num < 0 || field_num >= res->numAttributes)
3344 {
3345 pqInternalNotice(&res->noticeHooks,
3346 "column number %d is out of range 0..%d",
3347 field_num, res->numAttributes - 1);
3348 return false;
3349 }
3350 return true;
3351}
3352
3353static int
3354check_param_number(const PGresult *res, int param_num)

Callers 3

PQgetvalueFunction · 0.85
PQgetlengthFunction · 0.85
PQgetisnullFunction · 0.85

Calls 1

pqInternalNoticeFunction · 0.85

Tested by

no test coverage detected