| 3313 | */ |
| 3314 | |
| 3315 | static int |
| 3316 | check_field_number(const PGresult *res, int field_num) |
| 3317 | { |
| 3318 | if (!res) |
| 3319 | return false; /* no way to display error message... */ |
| 3320 | if (field_num < 0 || field_num >= res->numAttributes) |
| 3321 | { |
| 3322 | pqInternalNotice(&res->noticeHooks, |
| 3323 | "column number %d is out of range 0..%d", |
| 3324 | field_num, res->numAttributes - 1); |
| 3325 | return false; |
| 3326 | } |
| 3327 | return true; |
| 3328 | } |
| 3329 | |
| 3330 | static int |
| 3331 | check_tuple_field_number(const PGresult *res, |
no test coverage detected