| 3328 | } |
| 3329 | |
| 3330 | static int |
| 3331 | check_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 | |
| 3353 | static int |
| 3354 | check_param_number(const PGresult *res, int param_num) |
no test coverage detected