* pqSaveMessageField - save one field of an error or notice message */
| 993 | * pqSaveMessageField - save one field of an error or notice message |
| 994 | */ |
| 995 | void |
| 996 | pqSaveMessageField(PGresult *res, char code, const char *value) |
| 997 | { |
| 998 | PGMessageField *pfield; |
| 999 | |
| 1000 | pfield = (PGMessageField *) |
| 1001 | pqResultAlloc(res, |
| 1002 | offsetof(PGMessageField, contents) + |
| 1003 | strlen(value) + 1, |
| 1004 | true); |
| 1005 | if (!pfield) |
| 1006 | return; /* out of memory? */ |
| 1007 | pfield->code = code; |
| 1008 | strcpy(pfield->contents, value); |
| 1009 | pfield->next = res->errFields; |
| 1010 | res->errFields = pfield; |
| 1011 | } |
| 1012 | |
| 1013 | /* |
| 1014 | * pqSaveParameterStatus - remember parameter status sent by backend |
no test coverage detected