* FreeErrorData --- free the structure returned by CopyErrorData. * * Error handlers should use this in preference to assuming they know all * the separately-allocated fields. */
| 1877 | * the separately-allocated fields. |
| 1878 | */ |
| 1879 | void |
| 1880 | FreeErrorData(ErrorData *edata) |
| 1881 | { |
| 1882 | if (edata->message) |
| 1883 | pfree(edata->message); |
| 1884 | if (edata->detail) |
| 1885 | pfree(edata->detail); |
| 1886 | if (edata->detail_log) |
| 1887 | pfree(edata->detail_log); |
| 1888 | if (edata->hint) |
| 1889 | pfree(edata->hint); |
| 1890 | if (edata->context) |
| 1891 | pfree(edata->context); |
| 1892 | if (edata->backtrace) |
| 1893 | pfree(edata->backtrace); |
| 1894 | if (edata->schema_name) |
| 1895 | pfree(edata->schema_name); |
| 1896 | if (edata->table_name) |
| 1897 | pfree(edata->table_name); |
| 1898 | if (edata->column_name) |
| 1899 | pfree(edata->column_name); |
| 1900 | if (edata->datatype_name) |
| 1901 | pfree(edata->datatype_name); |
| 1902 | if (edata->constraint_name) |
| 1903 | pfree(edata->constraint_name); |
| 1904 | if (edata->internalquery) |
| 1905 | pfree(edata->internalquery); |
| 1906 | pfree(edata); |
| 1907 | } |
| 1908 | |
| 1909 | /* |
| 1910 | * FlushErrorState --- flush the error state after error recovery |
no test coverage detected