PQgetlength: * returns the actual length of a field value in bytes. */
| 3689 | * returns the actual length of a field value in bytes. |
| 3690 | */ |
| 3691 | int |
| 3692 | PQgetlength(const PGresult *res, int tup_num, int field_num) |
| 3693 | { |
| 3694 | if (!check_tuple_field_number(res, tup_num, field_num)) |
| 3695 | return 0; |
| 3696 | if (res->tuples[tup_num][field_num].len != NULL_LEN) |
| 3697 | return res->tuples[tup_num][field_num].len; |
| 3698 | else |
| 3699 | return 0; |
| 3700 | } |
| 3701 | |
| 3702 | /* PQgetisnull: |
| 3703 | * returns the null status of a field value. |